ich habe ein recht triviales Problem. Ich erstelle ein SubWindow und es wird auch angezeigt, aber es ist nicht richtig groß.
Man sieht quasi nur die obere Fensterleiste und muss es sich erst großziehen, bis der Inhalt ordentlich angezeigt wird.
Wo liegt mein Fehler?
Hier mal der Code dazu:
MainWindow:
Code: Alles auswählen
void MainWindow::newFile()
{
//Subwindow erzeugen
MdiSimMod *child = new MdiSimMod;
child->newSimMod();
mdiArea->addSubWindow(child);
//GroupBox festlegen
QGroupBox *gbSource = new QGroupBox(tr("Source"));
QRadioButton *rbTophat = new QRadioButton(tr("Tophat"));
QRadioButton *rbProcess = new QRadioButton(tr("Processed Measured"));
QRadioButton *rbSynthes = new QRadioButton(tr("Synthesized Physical"));
QVBoxLayout *blSource = new QVBoxLayout;
blSource->addWidget(rbTophat);
blSource->addWidget(rbProcess);
blSource->addWidget(rbSynthes);
gbSource->setLayout(blSource);
QGroupBox *gbMask = new QGroupBox(tr("Mask Nearfield"));
QRadioButton *rbKirchoff = new QRadioButton(tr("Kirchoff"));
QRadioButton *rbTopo = new QRadioButton(tr("Topographical"));
QVBoxLayout *blMask = new QVBoxLayout;
blMask->addWidget(rbKirchoff);
blMask->addWidget(rbTopo);
gbMask->setLayout(blMask);
QGridLayout *grid = new QGridLayout;
grid->addWidget(gbSource,0,0);
grid->addWidget(gbMask,1,0);
child->setLayout(grid);
child->show();
}Code: Alles auswählen
MdiSimMod::MdiSimMod()
{
}
void MdiSimMod::newSimMod()
{
//Fenstertitel des SubWindow
setWindowTitle("Simulation Modules");
}Vielen Dank schonmal für eure Hilfe.
Viele Grüße
Jana