Changeset 68287 in vbox
- Timestamp:
- Aug 3, 2017 2:23:53 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 117403
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISlidingWidget.cpp
r68166 r68287 17 17 18 18 /* Qt includes: */ 19 #include <QEvent> 19 20 #include <QHBoxLayout> 20 21 … … 75 76 } 76 77 78 bool UISlidingWidget::event(QEvent *pEvent) 79 { 80 /* Process desired events: */ 81 switch (pEvent->type()) 82 { 83 case QEvent::LayoutRequest: 84 { 85 // WORKAROUND: 86 // Since we are not connected to 87 // our children LayoutRequest, 88 // we should update geometry 89 // ourselves. 90 updateGeometry(); 91 break; 92 } 93 default: 94 break; 95 } 96 97 /* Call to base class: */ 98 return QWidget::event(pEvent); 99 } 100 77 101 void UISlidingWidget::resizeEvent(QResizeEvent *pEvent) 78 102 { … … 84 108 /* Update widget geometry: */ 85 109 m_pWidget->setGeometry(m_fStateIsFinal ? m_finalWidgetGeometry : m_startWidgetGeometry); 86 87 // TODO: Make this properly, dirty hack.88 /* A bit expensive but.. */89 updateGeometry();90 110 } 91 111 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISlidingWidget.h
r68166 r68287 63 63 protected: 64 64 65 /** Handles any Qt @a pEvent. */ 66 virtual bool event(QEvent *pEvent) /* override */; 67 65 68 /** Handles resize @a pEvent. */ 66 69 virtual void resizeEvent(QResizeEvent *pEvent) /* override */;
Note:
See TracChangeset
for help on using the changeset viewer.