diff options
Diffstat (limited to 'src-qt5/src-glwidgets/glw-base.cpp')
-rw-r--r-- | src-qt5/src-glwidgets/glw-base.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src-qt5/src-glwidgets/glw-base.cpp b/src-qt5/src-glwidgets/glw-base.cpp index e828df7f..8841743d 100644 --- a/src-qt5/src-glwidgets/glw-base.cpp +++ b/src-qt5/src-glwidgets/glw-base.cpp @@ -54,10 +54,13 @@ void GLW_Base::paintEvent(QPaintEvent *ev){ if( !child[i]->isWidgetType() ){ continue; } //not a widget GLW_Widget *glww = qobject_cast<GLW_Widget*>(child[i]); if(glww!=0){ - if(ev->rect().contains(glww->widgetRect())){ + if(!ev->rect().intersected(glww->widgetRect()).isNull()){ glww->paintYourself(&painter, ev); glww->paintChildren(&painter,ev); } - } + }/*else{ + QWidget *widg = qobject_cast<QWidget*>(child[i]); + widg->render(&painter, widg->geometry().topLeft()); + }*/ } } |