Solved QWidget have size of his parent Widget
-
Hi all,
I try to define a new QWidget object that manage QWidget childs, as this code:
ChartManagerWidget::ChartManagerWidget(QWidget *parent) : QWidget(parent) { tabWidgetGraph_ = new QTabWidget(this); }
I try to set the size of TabWidget to get as much space possible.
so I modify the code as:ChartManagerWidget::ChartManagerWidget(QWidget *parent) : QWidget(parent) { tabWidgetGraph_ = new QTabWidget(this); tabWidgetGraph_->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); }
But nothing append, size of TabWidget is still minimized...
I modify code that way:
ChartManagerWidget::ChartManagerWidget(QWidget *parent) : QWidget(parent) { setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored); tabWidgetGraph_ = new QTabWidget(this); }
but the size of my Widget is still minimal
Any thoughts ?
-
Hi,
Use a layout e.g. QVBoxLayout.
-
Thanks a lot SGaist, it's working fine ... I am so stupid :-)
-
You're welcome !
Since that answers your question please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)
-
@SGaist the topic tools dont propose me 'solve" item ... How can I do that