Hello,

I'm new in QT. I want to create an application with multi-view and resizeable. With QT designer, I've put a stackedWidget object inside my main window. First, I've created the folowwing method :

QWidget* accueilPlugin::createAppearancePage()
{
QWidget* appearancePage = new QWidget;

QGroupBox* openGroupBox = new QGroupBox(tr("Open at startup"));
QCheckBox* webBrowserCheckBox = new QCheckBox(tr("Web browser"));
QCheckBox* mailEditorCheckBox = new QCheckBox(tr("Mail editor"));
QCheckBox* newsgroupCheckBox = new QCheckBox(tr("Newsgroups"));

QGroupBox* toolbarsGroupBox = new QGroupBox(tr("Show toolbars as"));
QRadioButton* picturesAndTextRadioButton = new QRadioButton(tr("Pictures and "
"text"));
QRadioButton* picturesOnlyRadioButton = new QRadioButton(tr("Pictures only"));
QRadioButton* textOnlyRadioButton = new QRadioButton(tr("Text only"));

QCheckBox*tooltipsCheckBox = new QCheckBox(tr("Show tooltips"));
QCheckBox*webSiteIconsCheckBox = new QCheckBox(tr("Show web site icons"));
QCheckBox*resizeImagesCheckBox = new QCheckBox(tr("Resize large images to "
"fit in the window"));

QVBoxLayout *openLayout = new QVBoxLayout;
openLayout->addWidget(webBrowserCheckBox);
openLayout->addWidget(mailEditorCheckBox);
openLayout->addWidget(newsgroupCheckBox);
openGroupBox->setLayout(openLayout);

QVBoxLayout *toolbarsLayout = new QVBoxLayout;
toolbarsLayout->addWidget(picturesAndTextRadioButton);
toolbarsLayout->addWidget(picturesOnlyRadioButton);
toolbarsLayout->addWidget(textOnlyRadioButton);
toolbarsGroupBox->setLayout(toolbarsLayout);

QVBoxLayout *pageLayout = new QVBoxLayout;
pageLayout->setMargin(0);
pageLayout->addWidget(openGroupBox);
pageLayout->addWidget(toolbarsGroupBox);
pageLayout->addWidget(tooltipsCheckBox);
pageLayout->addWidget(webSiteIconsCheckBox);
pageLayout->addWidget(resizeImagesCheckBox);
pageLayout->addStretch();
appearancePage->setLayout(pageLayout);

webBrowserCheckBox->setChecked(true);
mailEditorCheckBox->setChecked(true);
picturesAndTextRadioButton->setChecked(true);
tooltipsCheckBox->setChecked(true);
webSiteIconsCheckBox->setChecked(true);

return appearancePage;
}

I add the object return by the createAppearancePage method in my stackedWidget object. Every thing work fine. When I resize may main window, the differents controls (created by createAppearancePage method) are well resized. Then, I wanted to do the same with QT Designer. I've created a .ui. The files ui_appearancePage.h and appearancePage.h/cpp. arce automatically created (the class appearancePage inherit from QWidget). Then I did stackedWidget->insertWidget(0, new appearancePage()). The resizing doesn't work. When I resize the main window, the different cotrols I've put in the ui file are not resize dynamically. I don't understand what I did wrong ? Thanks for your answers.