[Solved]Test89.exe stop working
-
Hi
In my Qt Application i had button to genarate tab dyanamically but i clicked that button it disply that error message ->Test89.exe stop working please anyone can suggest solution for that specailly why that error message occured common reason ?thanks
-
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 ?
-
Ohoooo Really missing initialized tabWidget
thanks Lot