mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 09:08:20 -04:00
Use more generic signal
This commit is contained in:
parent
210a48f91e
commit
4b58efc5c7
@ -82,7 +82,13 @@ QAction *YACReader::actionWithCustomIcon(const QIcon &icon, QAction *action)
|
|||||||
a->setChecked(action->isChecked());
|
a->setChecked(action->isChecked());
|
||||||
|
|
||||||
QObject::connect(a, &QAction::triggered, action, &QAction::triggered);
|
QObject::connect(a, &QAction::triggered, action, &QAction::triggered);
|
||||||
QObject::connect(action, &QAction::enabledChanged, a, &QAction::setEnabled);
|
|
||||||
|
QObject::connect(action, &QAction::changed, action, [=]() {
|
||||||
|
a->setEnabled(action->isEnabled());
|
||||||
|
a->setCheckable(action->isCheckable());
|
||||||
|
|
||||||
|
a->setChecked(action->isChecked());
|
||||||
|
});
|
||||||
QObject::connect(a, &QAction::toggled, action, &QAction::setChecked);
|
QObject::connect(a, &QAction::toggled, action, &QAction::setChecked);
|
||||||
QObject::connect(action, &QAction::toggled, a, &QAction::setChecked);
|
QObject::connect(action, &QAction::toggled, a, &QAction::setChecked);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user