QLayout Problem [gelöst]
Verfasst: 26. Juni 2012 09:37
Hi zusammen,
Ich seh den Wald vor lauter Bäumen nicht
bekomme beim kompilieren immer folgende Fehlermeldung:
Mein Ziel ist es zwei Verticale Layouts in ein Horizointales Layout zubringen.
Freue mich auf Antwort
Lg
Ich seh den Wald vor lauter Bäumen nicht
bekomme beim kompilieren immer folgende Fehlermeldung:
das der Code:QLayout: Attempting to add QLayout "" to InWidget "", which already has a layout
QLayout: Attempting to add QLayout "" to InWidget "", which already has a layout
QLayout: Attempting to add QLayout "" to InWidget "", which already has a layout
Code: Alles auswählen
hBox = new QHBoxLayout(this);
setLayout(hBox);
QLabel *month = new QLabel("Gesamt: €", this);
month->setFrameStyle(QFrame::Panel | QFrame::Raised);
box = new QGroupBox("Monatliche Einnahmen", this);
ibx = new QVBoxLayout(this);
set = new QPushButton("+", this);
box->setLayout(ibx);
lVbox = new QVBoxLayout(this);
lVbox->addWidget(box);
lVbox->addWidget(month);
for (int i = 0; i< 3; i++){
QLabel *l = new QLabel(QString("Label %1").arg(i), box);
ibx->addWidget(l);
}
rVbox = new QVBoxLayout(this);
rVbox->addWidget(set,3);
hBox->addLayout(lVbox);
hBox->addLayout(rVbox);Freue mich auf Antwort
Lg