Ejemplo n.º 1
0
    def __init__(self):
        super().__init__()
        self.logger = logging.getLogger(__name__)

        #initialize utilities
        self._initShortcuts()
        self._debuggingMode()

        #setting up page and register kiwoom object into the javascript context
        self.kiwoom = Kiwoom()
        self.record = Record()
        self.account = Account()

        #for i in range(16):
        #    self.settings().setAttribute(i, True)
        #    print(self.settings().testAttribute(i))

        webchannel = QWebChannel(self.page())
        self.page().setWebChannel(webchannel)

        webObjects = {
            "kiwoom": self.kiwoom,
            "record": self.record,
            "account": self.account
        }
        #webchannel.registerObject("kiwoom", self.history)
        webchannel.registerObjects(webObjects)
Ejemplo n.º 2
0
 def register_channel_objects():
     wc = QWebChannel(page)
     wc.registerObjects(wcobjects)
     page.setWebChannel(wc)