Do not add layouts twice
This fixes the warning "Attempting to add QLayout "" to LayoutEdit "", which already has a layout" when the main window is created.
This commit is contained in:
@ -32,7 +32,7 @@ LayoutEdit::LayoutEdit( LayoutManager* l )
|
|||||||
cmbLayouts = new QComboBox(frame);
|
cmbLayouts = new QComboBox(frame);
|
||||||
connect(cmbLayouts, SIGNAL(activated(int)), this, SLOT(load(int)));
|
connect(cmbLayouts, SIGNAL(activated(int)), this, SLOT(load(int)));
|
||||||
|
|
||||||
QHBoxLayout *layoutLayout = new QHBoxLayout(this);
|
QHBoxLayout *layoutLayout = new QHBoxLayout();
|
||||||
|
|
||||||
//most of these buttons can link directly into slots in the LayoutManager
|
//most of these buttons can link directly into slots in the LayoutManager
|
||||||
btnAdd = new QPushButton(frame);
|
btnAdd = new QPushButton(frame);
|
||||||
@ -118,7 +118,7 @@ LayoutEdit::LayoutEdit( LayoutManager* l )
|
|||||||
updateLayoutList();
|
updateLayoutList();
|
||||||
|
|
||||||
//add the buttons at the bottom.
|
//add the buttons at the bottom.
|
||||||
QHBoxLayout* h = new QHBoxLayout(this);
|
QHBoxLayout* h = new QHBoxLayout();
|
||||||
h->setMargin(0);
|
h->setMargin(0);
|
||||||
h->setSpacing(5);
|
h->setSpacing(5);
|
||||||
QPushButton* close = new QPushButton(QIcon::fromTheme("window-close"), tr("&Close Dialog"), this );
|
QPushButton* close = new QPushButton(QIcon::fromTheme("window-close"), tr("&Close Dialog"), this );
|
||||||
|
Reference in New Issue
Block a user