Changeset 181 for smplayer/trunk/src/lineedit_with_icon.cpp
- Timestamp:
- Aug 31, 2016, 5:31:04 PM (9 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 179
- Property svn:mergeinfo changed
-
smplayer/trunk/src/lineedit_with_icon.cpp
r176 r181 24 24 LineEditWithIcon::LineEditWithIcon(QWidget *parent) : QLineEdit(parent) 25 25 { 26 26 button = new QToolButton(this); 27 27 button->setCursor(Qt::ArrowCursor); 28 28 setupButton(); … … 51 51 } 52 52 53 void LineEditWithIcon::resizeEvent(QResizeEvent *) 54 { 55 QSize sz = button->sizeHint(); 56 int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); 57 button->move(rect().right() - frameWidth - sz.width(), 53 void LineEditWithIcon::resizeEvent(QResizeEvent *) { 54 QSize sz = button->sizeHint(); 55 int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth); 56 button->move(rect().right() - frameWidth - sz.width(), 58 57 (rect().bottom() + 1 - sz.height())/2); 59 58 } … … 64 63 setupButton(); 65 64 } else { 66 Q Widget::changeEvent(e);65 QLineEdit::changeEvent(e); 67 66 } 68 67 }
Note:
See TracChangeset
for help on using the changeset viewer.