浏览代码

Modification to fix a probleme under Windows

Benjamin Long 14 年之前
父节点
当前提交
6864f7dbca
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Libs/Widgets/ctkSearchBox.cpp

+ 2 - 1
Libs/Widgets/ctkSearchBox.cpp

@@ -121,13 +121,14 @@ ctkSearchBox::~ctkSearchBox()
 void ctkSearchBox::paintEvent(QPaintEvent * event)
 {
   Q_D(ctkSearchBox);
-  QPainter p(this);
 
   // Draw the line edit with text.
   // Text has already been shifted to the right (in resizeEvent()) to leave
   // space for the search icon.
   this->Superclass::paintEvent(event);
 
+  QPainter p(this);
+
   // Draw clearIcon
   QRect cRect = d->clearRect();
   QPixmap closePixmap = d->clearIcon.pixmap(cRect.size(),d->clearIconMode);