how to close window without close application
how to close window without close application
there is a way, but what would be the point?
Is there another way to communicate with the application?
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Are you sure mean "close" and not "minimize"? Clicking the "X" at the top right of the window frame (in Windows, anyway) closes the window. If it is the application's main window, the application will exit. You can override this behavior by calling setQuitOnLastWindowClosed( false ) or by overriding the closeEvent() handler and calling ignore() on the event.how to close window without close application
But why would you want to do that? When a user clicks the "X", he expects the application to exit. You are trying to implement something that goes against the normal behavior that every other application follows.
And like high_flyer says, if you do override this behavior, how will the use be able to exit the application? Will you force him to kill it with Task Manager?
i used setQuitLastWindowClosed () function used but it shows the error like
setQuitLastWindowClosed was not declare in the scope
There is no function setQuitLastWindowClosed() in Qt.
BTW: With your many years of Qt experience in multiple languages and on multiple platforms you should have absolutely no trouble sorting this out.
d_stranz (6th February 2014)
i used calculator button on the LCD screen on bottom when touched calculator button it shows the calculator menu when again i touched calculator button main screen is closed or LCD screen off
but i want only calculator application close without close LCD screen or main application
Can I be the first to say, "Huh?"
If this is somehow related to your other threads then add it to those threads, don't start another.
Maybe learning how to use QtAssistant would help you figure out that the method is really called QApplication::setQuitOnLastWindowClosed() (QGuiApplication in Qt 5).setQuitLastWindowClosed was not declare in the scope
Merged the threads and fixed the title
Cheers,
_
d_stranz (6th February 2014)
Bookmarks