PDA

View Full Version : Corner widget in QTabWidget doesn't show up



ePharaoh
6th April 2006, 16:22
The corner widget in a QTabWidget doesn't render at all.
I have tried to use QToolButton and QLabel.


{
QTabWidget tw;
QLabel *label = new QLabel("foo");
tw.setCornerWidget (label);
}


Simple enough, and I do see a little extra space at the beginning of the tab-list, but nothing is rendered there.

Chicken Blood Machine
6th April 2006, 16:44
Try showing the label.

ePharaoh
6th April 2006, 17:02
Well, it worked, after QLabel was parented to the tab! Usually these things are auto-parented; and that's why the confusion.



{
QTabWidget tw;
QLabel *label = new QLabel("foo", &tw);
tw.setCornerWidget (label);
}