Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I insert QTabBar in Qt Designer?

This might very well be very stupid question, but I can not find QTabBar in Qt Designer. There is QTabWidged in the "Containers" group, but it is not the same - I don't need different pages, I just need the tab bar.

(I am using 4.7.2 version of Qt Designer under KDE4 on debian.)

like image 921
gorn Avatar asked Apr 01 '11 23:04

gorn


2 Answers

There is no item in the designer that is a QTabBar, the only way you could accomplish this is by creating a plain QWidget and promoting it to a tabbar, but you will then have to set up the whole thing in code.

As for the pages you do realize that you can also promote the content widgets of a QTabWidget in designer to any subclass of QWidget, builtin or something that you created.

like image 114
Harald Scheirich Avatar answered Oct 31 '22 04:10

Harald Scheirich


In Qt Designer 4.8 you can add a Widget where you want the QTabBar to be, and then right-click and choose "Promote To ▸ QTabBar". (Note: "Promote To", not "Morph Into")

like image 2
Phrogz Avatar answered Oct 31 '22 05:10

Phrogz