.:saeed:.
20th January 2011, 09:04
Hello there !
What is wrong with this code, i am confused:mad:
void QNotePad::createMenus()
{
QMenu *fileMenu = menuBar()->addMenu("File");
m_newFileAction = fileMenu->addAction("New");
}
this function belongs to my MainWindow but when i run this code Qt says :
The program has unexpectedly finished.
/home/saeed/Documents/Qt Project/QNotePad-build-desktop/QNotePad exited with code 0
m_newFileAction is a QAction * data member.
Thanks
Added after 28 minutes:
i found it !;)
i had forgotten to insert QT+= gui core in my .pro file when i create new empty project
What is wrong with this code, i am confused:mad:
void QNotePad::createMenus()
{
QMenu *fileMenu = menuBar()->addMenu("File");
m_newFileAction = fileMenu->addAction("New");
}
this function belongs to my MainWindow but when i run this code Qt says :
The program has unexpectedly finished.
/home/saeed/Documents/Qt Project/QNotePad-build-desktop/QNotePad exited with code 0
m_newFileAction is a QAction * data member.
Thanks
Added after 28 minutes:
i found it !;)
i had forgotten to insert QT+= gui core in my .pro file when i create new empty project