[SOLVED] How do I access the QTabBars present in QMdiArea after I set the view to tabbed?
-
I need to put a tooltip for the QTabBars in QMdiArea and set their sizes fixed. How can I do that?
-
HI and welcome
Seems not to be a easy way to do it
but you can dig out the bar using codehttp://stackoverflow.com/questions/16530952/use-custom-tab-bar-with-qmdiarea
like
QTabBar *Bar=ui->mdiArea->findChild<QTabBar*>(); if (Bar) { Bar->setTabToolTip(0,"i won"); }
-
I need to put a tooltip for the QTabBars in QMdiArea and set their sizes fixed. How can I do that?
This post is deleted! -
HI and welcome
Seems not to be a easy way to do it
but you can dig out the bar using codehttp://stackoverflow.com/questions/16530952/use-custom-tab-bar-with-qmdiarea
like
QTabBar *Bar=ui->mdiArea->findChild<QTabBar*>(); if (Bar) { Bar->setTabToolTip(0,"i won"); }
@mrjj : I tried this:
I got the TabBar but I need to set a fixed width to all the tabs in that TabBar. How do I do that?
-
@mrjj : I tried this:
I got the TabBar but I need to set a fixed width to all the tabs in that TabBar. How do I do that?
@Pranjal-Jain
Not sure how one would do that from code directly but you can use stylesheet
setStyleSheet("QTabBar::tab { height: 100px; width: 100px; }");
and control it that way.