diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-01-18 09:47:13 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-01-22 11:59:55 (GMT) |
commit | 178f722835ec0995fe211046579c50893659cc8e (patch) | |
tree | c4cc8469ec165bb51b55a4c202a029dd60ac30ab /examples | |
parent | 2f48ff8cbefc70b2eb4de1e08a9e48c917486018 (diff) | |
download | Qt-178f722835ec0995fe211046579c50893659cc8e.zip Qt-178f722835ec0995fe211046579c50893659cc8e.tar.gz Qt-178f722835ec0995fe211046579c50893659cc8e.tar.bz2 |
Standard dialogs example does not respect non-native flag
When showing a colordialog from the example, it does not
check if the 'use native dialogs' checkbox is checked. This
patch makes sure it does
Diffstat (limited to 'examples')
-rw-r--r-- | examples/dialogs/standarddialogs/dialog.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/dialogs/standarddialogs/dialog.cpp b/examples/dialogs/standarddialogs/dialog.cpp index 9001619..92ed334 100644 --- a/examples/dialogs/standarddialogs/dialog.cpp +++ b/examples/dialogs/standarddialogs/dialog.cpp @@ -239,7 +239,12 @@ void Dialog::setText() void Dialog::setColor() { - QColor color = QColorDialog::getColor(Qt::green, this); + QColor color; + if (native->isChecked()) + color = QColorDialog::getColor(Qt::green, this); + else + color = QColorDialog::getColor(Qt::green, this, "Select Color", QColorDialog::DontUseNativeDialog); + if (color.isValid()) { colorLabel->setText(color.name()); colorLabel->setPalette(QPalette(color)); |