On Wed, 25 Nov 2009 15:15:37 +0000, Jugdish <jugd...@gmail.com> wrote: > 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?
The C++ method isn't virtual so you can't reimplement it. Phil _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt