Important: Please read the Qt Code of Conduct -

QDialogButtonBox does not react when it gets styled

  • now i have a proxy style called
    class ButtonProxyStyle : public QProxyStyle {}

    when i give that style to the buttons, they gets styled but does not react on clicks.

      QPushButton* buttonApply = this->ui->buttonBox->button(QDialogButtonBox::Apply);
      QPushButton* buttonReset = this->ui->buttonBox->button(QDialogButtonBox::Reset);
      QObject::connect(buttonApply, &QPushButton::clicked, this, &MyWidget::accept);
      QObject::connect(buttonReset, &QPushButton::clicked, this, &MyWidget::reject);

    i do not have any idea why. can someone help?

  • Lifetime Qt Champion


    What if you set the style on the QApplication object ?

  • i read this post:
    How to correctly use QProxyStyles?

    for me the important step is:


Log in to reply