View Single Post
Old 05-01-2012, 10:38 PM   #12
pkbo
Addict
pkbo ought to be getting tired of karma fortunes by now.pkbo ought to be getting tired of karma fortunes by now.pkbo ought to be getting tired of karma fortunes by now.pkbo ought to be getting tired of karma fortunes by now.pkbo ought to be getting tired of karma fortunes by now.pkbo ought to be getting tired of karma fortunes by now.pkbo ought to be getting tired of karma fortunes by now.pkbo ought to be getting tired of karma fortunes by now.pkbo ought to be getting tired of karma fortunes by now.pkbo ought to be getting tired of karma fortunes by now.pkbo ought to be getting tired of karma fortunes by now.
 
Posts: 251
Karma: 214890
Join Date: Sep 2006
Device: none
I don't have any skills inPython or PyQt so consider below as pseudocode. If you subclass some widget you may override event() method:
Code:
def event(self, event):
        ret =  Qwidget.event(self, event)
        if (event.type()==QEvent.UpdateRequest) and PyOnyx.screen.ScreenProxy.instance().isUpdateEnabled():
             PyOnyx.screen.ScreenProxy.instance().updateWidget(self, PyOnyx.screen.ScreenProxy.GU, true, PyOnyx.screen.ScreenProxy.WAIT_ALL)
        return ret
If you don't want to subclass a widget you may install event filter to it and process UpdateRequest event there, onyx/screen/screen_update_watcher.cpp is an example of such filter. It is also possible to subclass QApplication and override notify() method and to update screen there in this case you will not need to worry about screen refresh for every widget.

Last edited by pkbo; 05-01-2012 at 11:58 PM.
pkbo is offline   Reply With Quote