[Solved] QMessageBox with line edit
I am trying to create the effect of a QMessageBox with a line edit.
When a user clicks a button, the dialog should pop up over the main dialog for the user to input in the line edit, and once they press okay, the dialog goes away. I would like the main dialog to then be able to get the value from the line edit, without having to first store it off in settings in the dialog and retrieve it from settings in the main window.
How can I go about doing this?
Why do you want to use a QMessagebox instead of a dialogbox you created yourself?
Well I don't want to use a QMessageBox, I just want similar behavior in the dialog.
Ok, in that case have a look at "QInputDialog":http://developer.qt.nokia.com/doc/qt-4.7/qinputdialog.html
This way you don't have to make your own dialog.
EDIT : there is a nice example in how to use it too.