From 178f722835ec0995fe211046579c50893659cc8e Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 18 Jan 2010 10:47:13 +0100 Subject: 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 --- examples/dialogs/standarddialogs/dialog.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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)); -- cgit v0.12