Qt5: don't use native color dialog
This commit is contained in:
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user