Customizing Qt Tab Widget
-
wrote on 21 May 2016, 07:13 last edited by
Hello everyone. I am new to Qt and currently playing with Qt Tab widget. I was just wondering if could customize tabs so that the background color of the tab name(where we click to switch tabs) is different from the background color of the rest of the tab(inner space of the tab). Currently when i set some background color in the style sheet of the tab, it assigns the same color to the whole tab widget. I want the tab like a toolbar where the background of the toolbar(usually white) can be different from the rest of the window. How can I do that?
Any help would be really appreciated. -
Hello everyone. I am new to Qt and currently playing with Qt Tab widget. I was just wondering if could customize tabs so that the background color of the tab name(where we click to switch tabs) is different from the background color of the rest of the tab(inner space of the tab). Currently when i set some background color in the style sheet of the tab, it assigns the same color to the whole tab widget. I want the tab like a toolbar where the background of the toolbar(usually white) can be different from the rest of the window. How can I do that?
Any help would be really appreciated. -
wrote on 21 May 2016, 08:13 last edited by
Exactly! how did you do that?
-
wrote on 21 May 2016, 08:19 last edited by
what properties did you set in style sheet? can you show the style sheet?
-
-
wrote on 21 May 2016, 08:42 last edited by
I am getting my final window like this . Here you can see the white color that apeared around the tab icons(blue colored icons) in designer_mode is gone. This is my problem. I want white color around my blue icons.
-
I am getting my final window like this . Here you can see the white color that apeared around the tab icons(blue colored icons) in designer_mode is gone. This is my problem. I want white color around my blue icons.
-
wrote on 21 May 2016, 08:54 last edited by
Oh God! i thought preview would be same as the application. Application is showing the desired result. Problem solved. Thank you very much.
-
Oh God! i thought preview would be same as the application. Application is showing the desired result. Problem solved. Thank you very much.
-
wrote on 21 May 2016, 10:24 last edited by
@Farhan
I think you can set using http://doc.qt.io/qt-4.8/qtabwidget.html#tabBar -
@Farhan
I think you can set using http://doc.qt.io/qt-4.8/qtabwidget.html#tabBar
4/18