QDialog malfunction in modality mode
I want to create a child widget with option to block parent widget.
Many advise to create QDialog with exec_ method and I tried that.
I even tried to set setWindowModality(QtCore.Qt.ApplicationModal)
As result the child widget is always on top of parent, but if I click on parent the child loses his focus. And the parent widget still can be moved on screen or even minimized in trey.
What's the point of such modality if it's not block parent absolutely?
When you create your dialog, do you give the parent in the constructor ?
Dialog mydia( Parent );
Also, did you call QDialog constructor from your class?
MyDialog::MyDialog(QWidget *parent) :..
So the flags get set ?
I make my project in python with PyQt
No I didn't set parent.
When My QDialog class starts - parent is set to None
I just ported the project from ubuntu to windows and modality works perfectly (((
Looks like this is my problem in ubuntu + PyQt4
I'm so upset
Hi, sorry, though it was c++.
Never used Py so Have no idea.
I assume, your dialog is something like :
def init(self, parent = None):
which as far as I understand will call QDialog Constructor ?
update: Ah, works in win.
You are absolutely right with code.
And yeh ((( its work in win... Whyyyyyyyyyyyyy?
Well seems to be the same with C++.
Looks Modal but can still minimize Parent...
So I guess it how Ubuntu does "modal"
Prevents access to any control on the parent but not minimize/maxi.
Seems like other apps have this too. I guess its up to the windows
manager how it works.