Qt5: don't use native color dialog

This commit is contained in:
wmayer
2019-01-03 16:14:12 +01:00
parent 43e5729f54
commit 378c57fe1c

View File

@@ -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 &)),
@@ -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()));