PDA

View Full Version : How to make QInputDialog box modal less?



Mr_workalota787
13th June 2020, 06:22
I am using multiple QInput Dialog boxes in my UI, using the syntax like


QString s = QInputDialog::getText(this,"Sleep Command ","Enter the number of seconds" );


but when ever these Input dialog boxes pops up, the mainwindow becomes unresponsive, so how do i make all the QInputDialog boxes "modal less " and the mainwindow always stays responsive ??

ChrisW67
13th June 2020, 07:46
Do not use the static convenience functions, they give you a modal dialog.
Connect the textChanged() signal to a slot that will handle the changed value, and call dialog->show(). You can try QInputDialog::open() but I do not know if this gives you a modal or modeless dialog.