diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-01-18 10:47:13 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-01-22 12:59:55 +0100 |
commit | 178f722835ec0995fe211046579c50893659cc8e (patch) | |
tree | c4cc8469ec165bb51b55a4c202a029dd60ac30ab /examples/dialogs | |
parent | 2f48ff8cbefc70b2eb4de1e08a9e48c917486018 (diff) |
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/dialogs')
-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 90016196f5..92ed334ce9 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)); |