Hi all , thanks in advance for any advise...
I have a widget I created in designer, a few QLineEdit and QLabel aranged in a QGridLayout. I need to add this QWidget to an existing QGridLayout at a specific row,column.
this->BlockCacheUI=new pqSQBlockCacheWidget;
this->BlockCacheUI->setupUi(this);
this
->PanelLayout
->addWidget
((QWidget*)this
->BlockCacheUI,
8,
0,
2,
2,Qt
::AlignTop|Qt
::AlignLeft);
this->BlockCacheUI=new pqSQBlockCacheWidget;
this->BlockCacheUI->setupUi(this);
this->PanelLayout->addWidget((QWidget*)this->BlockCacheUI,8,0,2,2,Qt::AlignTop|Qt::AlignLeft);
To copy to clipboard, switch view to plain text mode
The last line produces
QLayout: Attempting to add QLayout "" to pqSQBOVMetaReader "pqSQBlockCacheWidget", which already has a layout
I have tried a few variations with out luck. What exactly is the problem? I have seen nested grid layouts before... How might I insert this custom widget into the existing grid layout?
Bookmarks