why Input Panel does not work in QDialog?
I make an application for keyboard less device.
I used http://doc.qt.io/qt-4.8/qt-tools-inputpanel-example.html for keyboard as virtual keyboard.
I have a dialog in my project that has two textboxes (one of them for enter user name and the other for input password ) with two buttons: OK and Cancel. after Build the project and run ,the press menu button to show menu form, then the dialog appears to check user authenticate. the user should enter data on text box the virtual keyboard .
the virtual keyboard (input panel in http://doc.qt.io/qt-4.8/qt-tools-inputpanel-example.html ) appears but the buttons not work.
when I searched I saw this : http://www.qtforum.org/post/117735/what-is-the-correct-way-to-invoke-a-dialog-so-it-uses-a-qinputcontext.html#post117735 that they say "sounds like you are trying to open another window from the dialog - this is your error. Of course the dialog will stay on top - that is its job."
because the dialog is modal, the virtual keyboard is disable
Is there anyway to edit the dialog or keyboard to work in modal widget?
Are you doing something different with that dialog regarding the rest of the application ?
No. this dialog just open from main window and shows two line edits , and also has OK and cancel button.
In dialog check the authenticate and make some methods true.
Can you describe what "does not work" means in this context ? What are you expecting ? What are you getting ?
@SGaist : I edit my post. So sorry for my bad post.
really thanks. It solved:
Modal dialogs are started with exec(), they block the program flow while a nested event loop runs. Modeless dialogs are started with show(), they do not block the program flow.
I use this code :
MyDialog *d=new MyDialog(this); d->show(); d->raise();
instead of this code:
MyDialog *d=new MyDialog(this); d.exec();
Are you also deleting it afterward ?
Restore it ? What do you mean by that ?