Changeset 41250 in vbox
- Timestamp:
- May 10, 2012 11:59:26 PM (13 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.cpp
r39261 r41250 60 60 connect(m_pTitleLabel, SIGNAL(linkActivated(const QString)), this, SIGNAL(titleClicked(const QString))); 61 61 62 /* Install event-filter: */ 63 qApp->installEventFilter(this); 62 /* Install local event-filters: */ 63 installEventFilter(this); 64 m_pTitleIcon->installEventFilter(this); 65 m_pWarningIcon->installEventFilter(this); 66 m_pTitleLabel->installEventFilter(this); 64 67 } 65 68 … … 131 134 if (m_pContentWidget) 132 135 { 136 m_pContentWidget->removeEventFilter(this); 133 137 layout()->removeWidget(m_pContentWidget); 134 // m_pContentWidget->removeEventFilter(this);135 138 } 136 139 m_pContentWidget = pWidget; 137 // m_pContentWidget->installEventFilter(this); 138 // m_pContentWidget->setMouseTracking(true); 139 layout()->addWidget(pWidget); 140 layout()->addWidget(m_pContentWidget); 141 m_pContentWidget->installEventFilter(this); 140 142 recalc(); 141 143 } … … 183 185 { 184 186 QEvent::Type type = pEvent->type(); 185 if ( type == QEvent::MouseMove 186 || type == QEvent::Wheel 187 || type == QEvent::Resize 188 || type == QEvent::Enter 189 || type == QEvent::Leave) 187 if (type == QEvent::Enter || 188 type == QEvent::Leave || 189 type == QEvent::MouseMove || 190 type == QEvent::Wheel) 190 191 updateHover(); 191 192 return false; … … 202 203 { 203 204 toggleOpen(); 204 }205 206 void UIPopupBox::mouseMoveEvent(QMouseEvent *pEvent)207 {208 updateHover();209 QWidget::mouseMoveEvent(pEvent);210 }211 212 void UIPopupBox::wheelEvent(QWheelEvent *pEvent)213 {214 updateHover();215 QWidget::wheelEvent(pEvent);216 }217 218 void UIPopupBox::enterEvent(QEvent *pEvent)219 {220 updateHover();221 QWidget::enterEvent(pEvent);222 }223 224 void UIPopupBox::leaveEvent(QEvent *pEvent)225 {226 updateHover();227 QWidget::leaveEvent(pEvent);228 205 } 229 206 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupBox.h
r39261 r41250 72 72 void resizeEvent(QResizeEvent *pEvent); 73 73 void mouseDoubleClickEvent(QMouseEvent *pEvent); 74 void mouseMoveEvent(QMouseEvent *pEvent);75 void wheelEvent(QWheelEvent *pEvent);76 void enterEvent(QEvent *pEvent);77 void leaveEvent(QEvent *pEvent);78 74 void paintEvent(QPaintEvent *pEvent); 79 75
Note:
See TracChangeset
for help on using the changeset viewer.