Code: Alles auswählen
verticalLayout = new QWidget(centralwidget);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
verticalLayout->setGeometry(QRect(100, 0, 491, 651));
vboxLayout = new QVBoxLayout(verticalLayout);
vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
vboxLayout->setContentsMargins(0, 0, 0, 0);
liste = new Liste(verticalLayout);
liste->setObjectName(QString::fromUtf8("liste"));
vboxLayout->addWidget(liste);Code: Alles auswählen
horizontalLayout = new QWidget(this);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
horizontalLayout->setGeometry(QRect(30, 20, 371, 111));
hboxLayout = new QHBoxLayout(horizontalLayout);
hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
hboxLayout->setContentsMargins(0, 0, 0, 0);
QSizePolicy::Expanding, QSizePolicy::Minimum);
einheit = new Einheit(horizontalLayout);
einheit->setObjectName(QString::fromUtf8("einheit"));
hboxLayout->setSpacing(1);
hboxLayout->addWidget(recheneinheit);
//this->update();
emit rechneradded();In der Klasse in welcher der erste Codeteil steht, habe ich versuchsweise nun noch:
Code: Alles auswählen
void mainapp::test(){
std::cout<<"TEST";
//liste->repaint();
vboxLayout->update();
}Habs mit dem Designer versucht, doch dieser spuckt mir ähnlichen Code aus, nur dass er diesen ja beim starten des Programms ausführt, und das Design nachträglich nicht mehr verändert werden kann.