` void MainWindow::on_graphView_customContextMenuRequested(const QPoint &pos) QObject::connect(ui->graphView ,SIGNAL(customContextMenuRequested(const QPoint &)),this,SLOT(on_graphView_customContextMenuRequested(const QPoint &))) Īnd the slot function that is called to handle the menu: ![]() Ui->graphView->setContextMenuPolicy(Qt::CustomContextMenu) MainWindow::MainWindow(QWidget *parent) : Since I'm trying to show a drop down menu on right click but I can't get it to work I added a connect and custom slot. When I do a right click in the area of my graphics view nothing happens (which is the default behavior afaik). ![]() I created a graphics view using the designer in Qt creator.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |