Browse Source

Don't use deprecated QButtonGroup::buttonClicked()

adaptive-webui-19844
Chocobo1 5 years ago
parent
commit
547982c741
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 5
      src/gui/properties/proptabbar.cpp

5
src/gui/properties/proptabbar.cpp

@ -100,8 +100,13 @@ PropTabBar::PropTabBar(QWidget *parent)
addWidget(speedButton); addWidget(speedButton);
m_btnGroup->addButton(speedButton, SpeedTab); m_btnGroup->addButton(speedButton, SpeedTab);
// SIGNAL/SLOT // SIGNAL/SLOT
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
connect(m_btnGroup, &QButtonGroup::idClicked
, this, &PropTabBar::setCurrentIndex);
#else
connect(m_btnGroup, qOverload<int>(&QButtonGroup::buttonClicked) connect(m_btnGroup, qOverload<int>(&QButtonGroup::buttonClicked)
, this, &PropTabBar::setCurrentIndex); , this, &PropTabBar::setCurrentIndex);
#endif
// Disable buttons focus // Disable buttons focus
for (QAbstractButton *btn : asConst(m_btnGroup->buttons())) for (QAbstractButton *btn : asConst(m_btnGroup->buttons()))
btn->setFocusPolicy(Qt::NoFocus); btn->setFocusPolicy(Qt::NoFocus);

Loading…
Cancel
Save