Hi.
I have subclassed QDockWidget and added some widgets to a vertical layoutmanager in it's constructor.
However, the widget of MyWidgetType is not visible.
If I don't add the QListWidget, I see the MyWidgetType widget just fine.
Could anybody give me any pointers as to what is going on here?
Torleif
this->setAllowedAreas(Qt::LeftDockWidgetArea);
mContextWidget
= new QWidget(this);
mContextWidget->setMaximumSize(150, 250);
this->setWidget(mContextWidget);
mVerticalLayout->setMargin(9);
mContextWidget->setLayout(mVerticalLayout);
myLabel->setText("mylabel:");
mVerticalLayout->addWidget(myLabel);
mVerticalLayout->addWidget(mListWidget);
MyOwnWidgetType *myWidget = new MyOwnWidgetType(mContextWidget);
mVerticalLayout->addWidget(myWidget);
this->setAllowedAreas(Qt::LeftDockWidgetArea);
mContextWidget = new QWidget(this);
mContextWidget->setMaximumSize(150, 250);
this->setWidget(mContextWidget);
mVerticalLayout = new QVBoxLayout();
mVerticalLayout->setMargin(9);
mContextWidget->setLayout(mVerticalLayout);
QLabel *myLabel = new QLabel(mContextWidget);
myLabel->setText("mylabel:");
mVerticalLayout->addWidget(myLabel);
mListWidget = new QListWidget(mContextWidget);
mVerticalLayout->addWidget(mListWidget);
MyOwnWidgetType *myWidget = new MyOwnWidgetType(mContextWidget);
mVerticalLayout->addWidget(myWidget);
To copy to clipboard, switch view to plain text mode
Bookmarks