PDA

View Full Version : QT 4.8 Layout Problem



cranberries
10th June 2015, 16:37
Hi,

I add a widget, and an existing layout into the main layout as follows,

QHBoxLayout* l = new QHBoxLayout();
l->setMargin( 2 );
l->setSpacing( 5 ) );
l->addWidget( txtLabel ); // seen on the main layout in QT 4.8
l->addLayout( mLayout, 1 ); // not seen on the main layout in QT 4.8
layout()->insertLayout(0,l);

The above code block works OK with 4.1, but it does not work OK with QT4.8. Could you please help about this difference ?

wysota
11th June 2015, 10:14
What exactly is "not seen"? Layouts do not have any visual appearance. Where exactly is this something "not seen"? What is this "main layout"? Where do you apply it?