You must use QDialog instead QMainWindow
You must use QDialog instead QMainWindow
a life without programming is like an empty bottle![]()
I need to use a main window with status bar, tool bar, etcOriginally Posted by zlatko
try use Qt::WType_Dialog
a life without programming is like an empty bottle![]()
Could it work, but It doesn'tOriginally Posted by zlatko
. The main window is closed automaticaly when I set it to dialog type. I think that one of the problems comes from that a main window is always a top level window because when I close its parent window, the main window is still running. Maybe a main window can never be modal, but it's strange
![]()
Hi again, I've found a strange behaviour: if I set the main window to Window::modal and child of another window, when I minimize the main window with the button at the top of the window, its parent window appear. But if i hide the application and show it again and i try to minimize the main window its parent not appears and that's exactly what I want. So, the question is: how can I make that the parent window never appears even if I minimize the main window or reduze its size until I close the main window?
Last edited by Dark_Tower; 14th March 2006 at 10:33.
You can just hide() the parent window when you show() the child window and show() the parent back when the child is close()d.
Thanks wysota, I didnt' take account with this solution because I thought that when a window is hidden it don't queue connections but it's false.
Hi again, sorry but I have to "reopen" this thread because I thought that hidin the parent window solves the problem, but now it doesnt' works until I have declared the parent windows as a dialog and I QDialog::exec it. Moreover, this dialog window is at the same time child of another window. I just want to know if you think that is possible to set a QMainWindow (child of a dialog, for example) modal or there's a reason that explains that it can't be modal, because I've tried it in a lot of ways but I haven't been succesfulor maybe it's a kind of bug in Qt4.1.0, I really will apreciate if someone tells me if with the new version of Qt is posible to set a QMainWindow, child of a QDialog or even top level, modal (with access to all the other windows in the appliaction blocked).
Thanks.
Last edited by Dark_Tower; 22nd March 2006 at 16:09.
Bookmarks