Important: Please read the Qt Code of Conduct -

Unable to close .exe file through close button

  • Hey guys!
    I use Qt5.5 and Win7, and I have a QWidget class with QCustomplot.
    After static compile&run, the .exe file works good.
    But i am unable to close this .exe through close button.
    (I can close widget window, but .exe is still exist in Windows Task Manager.)

    Are there any possible reasons might cause this problem?
    (I have checked the class destructor "delete ui".)

  • Lifetime Qt Champion

    hi and welcome
    just for test.
    Did u try without QCustomplot.
    or at least with no data in it.

  • Thanks, mrjj.

    I solve this problem by the following modification.
    (Use .show() instead of .exec() in main.cpp)

    int main(int argc, char *argv[])
        QApplication a(argc, argv);
        Dialog w;
        w.exec();  --->;
        return a.exec();

Log in to reply