PDA

View Full Version : add a label in a QTabWidget



sabeesh
1st August 2007, 07:35
Hi,
I have a mainwindow and a QTabWidget in that window. The QTabWidget had 2 tab. I create this window using QT4.2.2 designet. Now I want add a lebel in tab 0 using code!!!. How can I do it?

Gopala Krishna
1st August 2007, 08:02
Please don't double post. (link (http://www.qtcentre.org/forum/f-qt-programming-2/t-qgraphicsscene-and-qgraphicsview-8266.html))

marcel
1st August 2007, 08:36
Well, the easiest way I think is just to add the label. Worry about layouts later:


QLabel *label = new QLabel("label");
tabWidget->insertTab( -1, label, "Tab Text");


That's about it.

Regards