Native QColorDialog, Issue
-
Hello everyone!
system: Ubuntu 22.04
qt version: 6.2.4
my app: https://github.com/try-hard-factory/familiar
color picker library: https://github.com/ksnip/kColorPicker
(this library for qt5, but I updated it for qt 6)When I try to call the dialog, the dialog box is created but not displayed. The interface is also blocked (you cannot close the window for example): (select color window)

in the sample library everything works as it should:

I changed the library code and added a flag QColorDialog::DontUseNativeDialog
void ColorDialogButton::buttonClicked() { auto color = QColorDialog::getColor(Qt::white, this, QString(), QColorDialog::DontUseNativeDialog | getColorDialogOptions()); emit colorSelected(color); }and it helped:

I want to understand why this is happening. Perhaps I'm adding the color widget incorrectly?
Some code for understanding what's going on:color picker example:
int main(int argc, char **argv) { QApplication app(argc, argv); auto widget = new QWidget(); widget->setFixedWidth(200); widget->setFixedHeight(200); auto layout = new QVBoxLayout(); auto colorPicker = new KColorPicker(true); colorPicker->setColor(QColor(Qt::red)); layout->addWidget(colorPicker); widget->setLayout(layout); widget->show(); return app.exec(); }my code:
SettingsWindow::SettingsWindow(MainWindow* wm, QWidget* parent) ... , colorsTab_(new QWidget) , colors_(new ColorsWidget(colorsTab_)) ... { ... // colors auto* colorsLayout = new QVBoxLayout(colorsTab_); colorsTab_->setLayout(colorsLayout); colorsLayout->addWidget(colors_); tabWidget_->addTab(colorsTab_, tr("Colors")); ... }ColorsWidget::ColorsWidget(QWidget* parent) : QWidget(parent) , layout_(new QVBoxLayout(this)) { layout_->setAlignment(Qt::AlignTop); auto colorPicker = new KColorPicker(true); colorPicker->setColor(QColor(Qt::red)); layout_->addWidget(colorPicker); setLayout(layout_); }regards, max