mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
Maintain compatibility to Qt 5.12 (for Focal) (#392)
This commit is contained in:
parent
2099b0cb0b
commit
745d220efd
@ -91,8 +91,13 @@ TaskPanel::TaskPanel(QWidget* parent) : rviz_common::Panel(parent), d_ptr(new Ta
|
||||
Q_D(TaskPanel);
|
||||
|
||||
// sync checked tool button with displayed widget
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
||||
connect(d->tool_buttons_group, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::idClicked), d->stackedWidget,
|
||||
[d](int index) { d->stackedWidget->setCurrentIndex(index); });
|
||||
#else
|
||||
connect(d->tool_buttons_group, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked),
|
||||
d->stackedWidget, [d](int index) { d->stackedWidget->setCurrentIndex(index); });
|
||||
#endif
|
||||
connect(d->stackedWidget, &QStackedWidget::currentChanged, d->tool_buttons_group,
|
||||
[d](int index) { d->tool_buttons_group->button(index)->setChecked(true); });
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user