[SOLVED] How do I access the QTabBars present in QMdiArea after I set the view to tabbed?
-
wrote on 20 Aug 2015, 12:45 last edited by Pranjal Jain
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?
wrote on 20 Aug 2015, 20:38 last edited byThis 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"); }
wrote on 21 Aug 2015, 04:47 last edited by Pranjal Jain@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.
5/5