QString QInputDialog::getText ( QWidget * parent, const QString & title,
const QString & label, QLineEdit::EchoMode mode = QLineEdit::Normal,
const QString & text = QString(), bool * ok = 0,
Qt::WindowFlags flags = 0 ) [static]
This function is defined to call a dialog get and return the text which will be inserted in a QLine edit. So I want to create a getData static method that returnes a data structure (say QPair) and work right like QInputDialog::getText(). I tried but I couldn’t do that. How can I do that?
I have done it, but I post for people that need this. Here is an axample of a dialog box, which is for resizing an image. To be more precise it is for representing user the current size of an image and provide him/her with an interface to change the size and get the new size with a QPair.
And now you can do this: