GithubHelp home page GithubHelp logo

Comments (8)

stefanb2 avatar stefanb2 commented on July 30, 2024

The one generated by the system (the lower entry with icon) quits the program correctly. But it causes issue #45.

The one generated by QT-SESAM (the upper entry without icon) only closes the main window.

from qt-sesam.

stefanb2 avatar stefanb2 commented on July 30, 2024

As far as I can tell from the source code, the main menu entry File -> Exit and the system tray icon menu entry Quit are connected to the main window slot close(). I.e. they only close the main window, but do not exit the application.

The system generated entry on the system tray icon menu causes this dialog:

Uploading QtSESAM-tray-menu-Exit-Dialog.png…

which I can't find in the source code. So I assume this is a "force application" dialog from the system.

IMHO a real "exit" is missing in the Qt-SESAM code

from qt-sesam.

stefanb2 avatar stefanb2 commented on July 30, 2024

ah damn... wrong button. This is NOT closed :-(

from qt-sesam.

stefanb2 avatar stefanb2 commented on July 30, 2024

OK, somehow the PNG uploads got lost. Trying again:

qtsesam-tray-menu-exit-dialog

qtsesam-tray-menu-kdeplasma

from qt-sesam.

607011 avatar 607011 commented on July 30, 2024

If close() is called on the MainWindow the main loop exits, thus ending the application. That's the theory and works on Windows in practice. Regarding the Qt docs this is the desired behavior of close() and should be the same on other platforms. Should

from qt-sesam.

stefanb2 avatar stefanb2 commented on July 30, 2024

I checked the documentation: your mainwindow code looks correct. Except maybe the QMainWindow::closeEvent() calls.

I even connected the exit with the closeAllWindows slot on qApp and it still doesn't work.

So my assumption is that the problem is in QApplication, not your main window code. I.e. the application doesn't exit when the last window is closed.

from qt-sesam.

607011 avatar 607011 commented on July 30, 2024

Regarding the extra "Quit" tray item: It doesn't appear on every Linux desktop. So it leads to nothing to #ifdef WIN32 the code section that inserts the "Quit" action :-(

from qt-sesam.

607011 avatar 607011 commented on July 30, 2024

Obviously some Linux desktops add a quit button by themselves. Won't do anything about it. Thus closing this issue.

from qt-sesam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.