PDA

View Full Version : Crash after closing by "X" - How to find the bug?



SenSej
21st September 2008, 22:14
Hello there,

My application compiles, with no warning and any errors.
After executing it makes all i want - all my functions are working fine, so far i can see.

I made an "Exit" QPushButton, and in the "on_exitButton_clicked()"-method just do
"exit(0);" - works totally fine!

But when i push the "X" on top right of the mainwindow, an only then, Windows telling me
"app.exe made an error". This error occurs on two different machines.

If i copy the code out of an example from the QT-assistant and execute it, this error won´t occur!?!

How can i get any Information about what happens while closing by "X"?

I´m working with:
QT 4.4
Eclipse 3.3.2
Qt C++ Eclipse Integration 1.4.0
MinGW-5.1.4.exe
And (sorry for that) on WindowsXP Pro SP2

Thanx a lot in advance.

kingslee
23rd September 2008, 17:51
post ur main.cpp code.

Also better to use the slot quit() in the connect directly instead of exit(0).

SenSej
24th September 2008, 17:39
My main.cpp? Never changed somthing in it. Was set up automatically:


#include "MainWindow.h"
#include <QApplication>

int main(int argc, char *argv[]) {

QApplication a(argc, argv);

MainWindow w;
w.show();

return a.exec();
}


I deleted some unused Widgets in my UI-File. Since then, the errormessage never appeared again - Happy about it, i won´t ask why.

But Thanx for your help