Skip to content

Commit

Permalink
Qt5: don't use native color dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jan 3, 2019
1 parent b845553 commit 8358d7f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Gui/Widgets.cpp
Expand Up @@ -748,6 +748,9 @@ void ColorButton::onChooseColor()
#endif
QColor currentColor = d->col;
QColorDialog cd(d->col, this);
#if QT_VERSION >= 0x050000
cd.setOptions(QColorDialog::DontUseNativeDialog);
#endif

if (d->autoChange) {
connect(&cd, SIGNAL(currentColorChanged(const QColor &)),
Expand All @@ -771,6 +774,9 @@ void ColorButton::onChooseColor()
if (d->cd.isNull()) {
d->old = d->col;
d->cd = new QColorDialog(d->col, this);
#if QT_VERSION >= 0x050000
d->cd->setOptions(QColorDialog::DontUseNativeDialog);
#endif
d->cd->setAttribute(Qt::WA_DeleteOnClose);
connect(d->cd, SIGNAL(rejected()),
this, SLOT(onRejected()));
Expand Down

0 comments on commit 8358d7f

Please sign in to comment.