Solved How to map a ui->Widget to PaintEvent
I have a bunch of tabs which I built using QtCreator. In mainwindow you can access the tabs using ui->tabWidget->blahblah
I'd like to know how I can access paintEvents for ui->tabWidget?
I had a similar post earlier but that was when I created my own tabs programmatically and subclass QTabBar and QTabWidget. But now I have a new requirement where the tabs have already been created using QTCreator and I'd like to change the color of the tabs.
Any help would be appreciated!
SGaist Lifetime Qt Champion last edited by
You can't. If you want to do custom painting, you need to subclass. You can then use the promote feature of designer to use your subclass.