
Originally Posted by
wysota
In what way "it doesn't do the job"?
Well simply i don't get that interface when i start the application i get just an empty interface which is the interface for the QStackedwidget
Added after 5 minutes:
this is the code of my mainWindow
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "widget2.h"
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->stackedWidget->setCurrentIndex(0);
Widget2 *newWidget2 = new Widget2;
ui->stackedWidget->addWidget(newWidget2);
}
MainWindow::~MainWindow()
{
delete ui;
}
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "widget2.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
ui->stackedWidget->setCurrentIndex(0);
Widget2 *newWidget2 = new Widget2;
ui->stackedWidget->addWidget(newWidget2);
}
MainWindow::~MainWindow()
{
delete ui;
}
To copy to clipboard, switch view to plain text mode
Bookmarks