Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.6.0
-
Ubuntu 16.04, 64 bit
-
e4fb521b3f3b9e59146b7569b72aee08dbaeb268
Description
Please see screencast - https://youtu.be/sFPtfhPOLyc. With 5.5.1 all works fine. Example:
#include <QApplication>
#include <QMenu>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel* l = new QLabel( "test" );
l->setCursor( Qt::PointingHandCursor );
l->setContextMenuPolicy( Qt::CustomContextMenu );
QObject::connect( l, &QWidget::customContextMenuRequested, []
);
QGraphicsScene scene;
scene.addWidget( l );
QGraphicsView graphicsView;
graphicsView.setScene(&scene);
graphicsView.show();
return app.exec();
}