[PyQt] Re-implemented function doesn't get called from internal Qt
methods
Jugdish
jugdizh at gmail.com
Wed Nov 25 15:15:37 GMT 2009
I have written my own class derived from QTabBar with a re-implementation of
the QTabBar::initStyleOption() method, but for some reason it never gets
executed.
Here is my code:
########################################
from PyQt4 import QtGui
class MyTabBar(QtGui.QTabBar):
def initStyleOption(self, option, tabIndex):
print "inside initStyleOption"
QtGui.QTabBar.initStyleOption(self, option, tabIndex)
########################################
Looking at the Qt source code for QTabBar (qtabbar.cpp), I see that
initStyleOption() is called inside the paintEvent() method, so I should be
seeing my print statement on every paint event.
Any idea what I'm doing wrong?
Thanks,
-Jugdish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20091125/119de944/attachment-0001.html
More information about the PyQt
mailing list