Hi all, I've seen that with the dialog to obtain a color, it returns the color chosen by the user. I want a dialog that returns a QList, for example. Is it possible? or I've to put this list as public in the dialog subclass?
Thanks all.
Hi all, I've seen that with the dialog to obtain a color, it returns the color chosen by the user. I want a dialog that returns a QList, for example. Is it possible? or I've to put this list as public in the dialog subclass?
Thanks all.
The implementation of those static dialog methods do it like that they first launch a dialog and depending on the result code the desired variable is asked from the dialog and returned..
Still if it's "hidden" bedind a static method returning something else than a dialogs result code, the internal implementation always checks the result code..
For example QColorDialog::getColor() looks like this:
Qt Code:
dlg->setColor(initial); dlg->selectColor(initial); int resultCode = dlg->exec(); QColor result; result = dlg->color(); delete dlg; return result;To copy to clipboard, switch view to plain text mode
SkripT (21st March 2006)
Bookmarks