[Solved]Test89.exe stop working
General and Desktop
5
Posts
2
Posters
1.4k
Views
1
Watching
-
-
Hi,
Without any code it's essentially crystal ball guessing:
- Invalid pointer ?
- Memory Access Error ?
- Memory Leak ?
- Others ?
Did you run your application through a debugger ?
-
My code
@
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);QObject::connect(ui->pushButton,SIGNAL(clicked()),this,SLOT(tabGenarate()));
}
void MainWindow::tabGenarate()
{tab = new QWidget; tabWidget->addTab(tab,"New"); ui->verticalLayout->addWidget(tabWidget);
}
@ -
what is tabWidget ? Were is it initialized ?
Are you sure that your ui has a member verticalLayout ?