PDA

View Full Version : QTabWidget cuts off QX11EmbedContainer a little bit?



dsab123
12th July 2012, 15:52
Hello everybody,

So I have a QTabWidget that houses two other widgets, a QX11EmbedContainer and a regular QWidget.

The problem I'm having is that the tabs at the top cut off the top of the widgets they are displaying:

8007

Hopefully this isn't a major problem.
I tried making both the QTabWidget and its childs bigger using setFixedSize(), but the children keep sticking to the top of their parent.



QX11EmbedContainer *container;
QWidget *wd;
QTabWidget *livePlayTab;

livePlayTab = new QTabWidget ( this );
livePlayTab -> setFixedSize ( 320, 320 );
livePlayTab -> setTabPosition ( QTabWidget::North );


container = new QX11EmbedContainer ( livePlayTab );
container -> setFixedSize ( 320, 240 );
container -> show();

wd = new QWidget ( livePlayTab );
wd -> setFixedSize ( 320, 240 );
wd -> show();

livePlayTab -> addTab ( container, "Live Display" );
livePlayTab -> addTab ( wd, "Playback" );


livePlayTab is inside a few other QGridLayouts, if that helps at all.

Putting the tabs in the south position isn't as appealing..

Does anyone know how I fix this problem?

EDIT: I think I need to look in the QStyleOptionTabWidgetFrame docs, am I right?