QT,鼠標在指定部件上右鍵彈出菜單

關鍵是:m_chartView->underMouse(),只有在圖表上右鍵纔會彈出菜單web void Curves::contextMenuEvent(QContextMenuEvent* e) { if (m_chartView->underMouse()) //只有鼠標在圖表上右鍵才彈出設置 { QMenu *viewMenu = menuBar()->addMenu(t
相關文章
相關標籤/搜索