Unsolved How can i use Widget from Qt designer to add a QWidget inside of it from the code
-
QWidget *widget = new QWidget(); QGridLayout *layout = new QGridLayout(widget); widget->setLayout(layout); layout->addWidget(new QPushButton("My Button", widget));
How can i add widget inside a Widget from qt designer
-
Hi
Any widget you add in the designer is accessible via
ui->widgetnameSo if you place your code after setupUI in constructor then
you can just use it like any normal pointer that you new'd yourself