myPopupmenu
->insertItem
(QPixmap::fromMimeSource("wireFrame.png"),
"WireFrame", this, SLOT(CALLpopupmenu()), 0, 0, 1);
myPopupmenu
->insertItem
(QPixmap::fromMimeSource("zoom_in.png"),
"Zoom in", this, SLOT(CALLpopupmenu()), 0, 1, 2);
void MyWidget::CALLpopupmenu() {
QPopupMenu* item = (QPopupMenu*)sender();
cout << " item " << item << endl; //item hasn't the true value
}
myPopupmenu->insertItem(QPixmap::fromMimeSource("wireFrame.png"),
"WireFrame", this, SLOT(CALLpopupmenu()), 0, 0, 1);
myPopupmenu->insertItem(QPixmap::fromMimeSource("zoom_in.png"),
"Zoom in", this, SLOT(CALLpopupmenu()), 0, 1, 2);
void MyWidget::CALLpopupmenu() {
QPopupMenu* item = (QPopupMenu*)sender();
cout << " item " << item << endl; //item hasn't the true value
}
To copy to clipboard, switch view to plain text mode
Bookmarks