14 m_ui.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(
false);
15 connect(m_ui.gradientView, &QtGradientView::currentGradientChanged,
16 this, &QtGradientViewDialog::slotGradientSelected);
17 connect(m_ui.gradientView, &QtGradientView::gradientActivated,
18 this, &QtGradientViewDialog::slotGradientActivated);
30 dlg.setWindowTitle(caption);
31 QGradient grad = QLinearGradient();
32 const int res = dlg.exec();
33 if (res == QDialog::Accepted)
34 grad = dlg.m_ui.gradientView->gradientManager()->gradients().value(dlg.m_ui.gradientView->currentGradient());
36 *ok = res == QDialog::Accepted;