Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Unable to close .exe file through close button
Qt 6.11 is out! See what's new in the release blog

Unable to close .exe file through close button

Scheduled Pinned Locked Moved Solved General and Desktop
qwidget
3 Posts 2 Posters 1.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MurphyC
    wrote on last edited by A Former User
    #1

    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".)
    Thanks!

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

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

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MurphyC
        wrote on last edited by
        #3

        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();  ---> w.show();
        
            return a.exec();
        }
        
        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved