How to show window on modal window?
-
I have a window with some buttons. When i click buttons it opens a window as modal window (setWindowModality(Qt::ApplicationModal) setted). And it block the interaction with mainwindow as i expect.
Now I want to open new window(my custom keyboard) from modal and interaction with modal and newwindow should be possible when newwindow always stays top of modal.i tried adding
setWindowFlags(Qt::WindowStaysOnTopHint|Qt::X11BypassWindowManagerHint);
on top window but it didnt do the job. All windows inherited from QWidget. how can i do that?
-
I have a window with some buttons. When i click buttons it opens a window as modal window (setWindowModality(Qt::ApplicationModal) setted). And it block the interaction with mainwindow as i expect.
Now I want to open new window(my custom keyboard) from modal and interaction with modal and newwindow should be possible when newwindow always stays top of modal.i tried adding
setWindowFlags(Qt::WindowStaysOnTopHint|Qt::X11BypassWindowManagerHint);
on top window but it didnt do the job. All windows inherited from QWidget. how can i do that?
@masa4 said in How to show window on modal window?:
I want to open new window from modal and interaction with modal and newwindow should be possible
How exactly do you open this new window (code)?
-
@masa4 said in How to show window on modal window?:
I want to open new window from modal and interaction with modal and newwindow should be possible
How exactly do you open this new window (code)?
@jsulm When focus in/out event occured for lineedit widgets on modal, i am emitting signals. Connecting it to a slot in mainwidget.cpp. the slot:
mainwidget.cpp:void MainWidget::KeyboardOpen() { keyboard->show(); } void MainWidget::KeyboardClose() { keyboard->close(); }
mainwidget.h
Keyboard *keyboard = new Keyboard;
It opens the keyboard widget. I want the keyboard widget allways on top with allowing interaction with modal window.