Created
January 3, 2017 18:59
-
-
Save jon-weisz/69e698a694bd94b05b7ebeb424297aef to your computer and use it in GitHub Desktop.
View Meta UIC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewMeta(type): | |
def __new__(cls, name, parents, dct): | |
if 'uic_file' in dct: | |
uic_form, uic_base = #magic uic loading | |
parents_extended = [p for p in parents] + [uic_form, uic_base] | |
return super(InterfaceMeta, cls).__new__(cls, name, parents_extended, dct) | |
class ViewClass(object): | |
__metaclass__ = ViewMeta | |
uic_file=path_to_uic |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment