Issue with customlistWidgetmenue: Menu pops up at application start
-
Hi Everybody,
i have a strange issue with a listWidgetmenue.
I add a costumContext listWidgetMenu to my application.
When I start the application the menu pops in the top left corner at the screen.Because this is hard to catch as a screenshot I have made a minimal code example - also to proof this issue. Download is here:
https://code.ademmler.com/QtMinimaIGraphicsscene.zipAny ideas what I am doing wrong here.
Alexander
-
void MainWindow::on_listWidget_customContextMenuRequested(const QPoint &pos) { listWidgetMenu->popup(ui->listWidget->viewport()->mapToGlobal(pos)); }
Check the coordinates here. What is
pos
and what doesui->listWidget->viewport()->mapToGlobal(pos)
return? -
Thanks for your response. The coordinates in operation mode are fine.
For example: Global pos: QPoint(1009,354)My question is about "application launch" - there this menu flickers/pops/ up without any right mouse click be done. At this moment you can see it at the left top corner.
What I want is: That this menu does not appear at application launch ...