hello everybody;
i have a problem when opening a window and close it for 30 times the application crashes and this is done in every window here are the code i used to open the window
Code:void MainWindow::openSupportWindow() { if(!m_pSupportWindow) { m_pSupportWindow = new DownloadMainWindow(this); m_pSupportWindow->show(); m_pSupportWindow->loadCustomPage(SUPPORT); connect(m_pSupportWindow, SIGNAL(destroyed()), this, SLOT(nullPointer())); } }and here are the code i used in the window itselfCode:void MainWindow::nullPointer() { m_pFeedBackWindow = NULL; m_pSupportWindow = NULL; m_pUpdateWindow = NULL; }
why my application crashes when i open the window and close it for approximately 30 times?Code:setAttribute(Qt::WA_DeleteOnClose);

Reply With Quote

