PDA

View Full Version : Dialog



David_
20th November 2012, 12:42
Hi All,
I am writing Dialog from scratch. I use a simple widget. When I need a dialog box I write mydialogwidget.show();
But I want the user not to be able to change the focus. (I mean like in QMessageBox)
How can I do it?
(a keyword to start searching would be also good)
Thanks, David

amleto
20th November 2012, 13:10
http://doc.qt.digia.com/qt/qwidget.html#windowModality-prop

Lesiok
20th November 2012, 14:03
or use mydialogwidget.exec()

David_
21st November 2012, 07:50
Thank you, I will check them.
I supposed that the widget has such a property but I didn’t know the keyword to start searching.
By the way I got a good keyword: reading.

Finally I used QMessageBox with less text and less buttons on it. So I was able to do a good messagebox. (And as you said .exec() solved the problem)
I think a more general messagebox would be pretty in the future. :-) I read many forum that people want more buttons and longer text.
Have a good day,
David