mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
ButtonWithMenu: Fix down state handling
This commit is contained in:
parent
00e2af4164
commit
310f3cfde7
@ -25,9 +25,11 @@ ButtonWithMenu::ButtonWithMenu(QWidget* parent)
|
|||||||
, m_menu(new QMenu(this))
|
, m_menu(new QMenu(this))
|
||||||
{
|
{
|
||||||
setCursor(Qt::ArrowCursor);
|
setCursor(Qt::ArrowCursor);
|
||||||
setFocusPolicy(Qt::ClickFocus);
|
setFocusPolicy(Qt::NoFocus);
|
||||||
|
|
||||||
connect(this, SIGNAL(aboutToShowMenu()), this, SLOT(generateMenu()));
|
connect(this, SIGNAL(aboutToShowMenu()), this, SLOT(generateMenu()));
|
||||||
|
connect(m_menu, &QMenu::aboutToShow, this, std::bind(&ButtonWithMenu::setDown, this, true));
|
||||||
|
connect(m_menu, &QMenu::aboutToHide, this, std::bind(&ButtonWithMenu::setDown, this, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ButtonWithMenu::setCurrentItem()
|
void ButtonWithMenu::setCurrentItem()
|
||||||
|
Loading…
Reference in New Issue
Block a user