Changeset 8705 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- May 8, 2008 1:16:30 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/QIStateIndicator.cpp
r8170 r8705 158 158 void QIStateIndicator::mousePressEvent (QMouseEvent *aEv) 159 159 { 160 QContextMenuEvent qme (QContextMenuEvent::Mouse, aEv->pos(), aEv->globalPos(), 0); 161 emit contextMenuRequested (this, &qme); 162 if (qme.isAccepted()) 163 aEv->accept(); 164 else 160 /* Do this for the left mouse button event only, cause in the case of the 161 * right mouse button it could happen that the context menu event is 162 * triggered twice. Also this isn't necessary for the middle mouse button 163 * which would be some kind of overstated. */ 164 if (aEv->button() == Qt::LeftButton) 165 { 166 QContextMenuEvent qme (QContextMenuEvent::Mouse, aEv->pos(), aEv->globalPos(), 0); 167 emit contextMenuRequested (this, &qme); 168 if (qme.isAccepted()) 169 aEv->accept(); 170 else 171 QFrame::mousePressEvent (aEv); 172 }else 165 173 QFrame::mousePressEvent (aEv); 166 174 }
Note:
See TracChangeset
for help on using the changeset viewer.