diff --git a/panels/dock/tray/frame/window/quickpluginwindow.cpp b/panels/dock/tray/frame/window/quickpluginwindow.cpp index 5153947e1..1ecd68cd2 100644 --- a/panels/dock/tray/frame/window/quickpluginwindow.cpp +++ b/panels/dock/tray/frame/window/quickpluginwindow.cpp @@ -921,10 +921,15 @@ void QuickDockItem::mousePressEvent(QMouseEvent *event) } if (!m_contextMenu->actions().isEmpty()) { - m_contextMenu->popup(QCursor::pos()); + QTimer::singleShot(0, this, [this]() { + QMenu contextMenu(this); + contextMenu.addActions(m_contextMenu->actions()); + contextMenu.exec(QCursor::pos()); + }); + + // Fixme: Can cause crash in some cases + //m_contextMenu->popup(QCursor::pos()); } - - return QWidget::mousePressEvent(event); } void QuickDockItem::enterEvent(QEnterEvent *event)