Getting an event on calling update()
-
We are rendering a QWidget on a transparent layer for Ogre. We wanted to get an event if update() or repaint() functions are called at any time. We added an extra event to be able to do that. We are using version 4.8.4.
Is there any easier solution to do that?
ViveTech
@
diff -r a\qcoreevent.h b\qcoreevent.h
298,300d297
<
< InvisibleOnScreenUpdate = 1001,
<
diff -r a\qwidget.cpp b\qwidget.cpp
1182d1181
< m_invisibleOnScreen = false;
1200d1198
< m_invisibleOnScreen = false;
1216d1213
< m_invisibleOnScreen = false;
9446,9455d9442
< bool QWidget::invisibleOnScreen() const
< {
< return m_invisibleOnScreen;
< }
<
< void QWidget::setInvisibleOnScreen( bool invisible )
< {
< m_invisibleOnScreen = invisible;
< }
<
10481,10487d10467
< if( invisibleOnScreen() )
< {
< QEvent* invisibleUpdateEvent = new QEvent(QEvent::InvisibleOnScreenUpdate);
< QApplication::sendEvent( this, invisibleUpdateEvent );
< return;
< }
<
10523,10530c10503
< if( invisibleOnScreen() )
< {
< QEvent* invisibleUpdateEvent = new QEvent(QEvent::InvisibleOnScreenUpdate);
< QApplication::sendEvent( this, invisibleUpdateEvent );
< return;
< }
<
< if (!isVisible() || !updatesEnabled() || rgn.isEmpty() )if (!isVisible() || !updatesEnabled() || rgn.isEmpty())
10588,10594d10560
< if( invisibleOnScreen() )
< {
< QEvent* invisibleUpdateEvent = new QEvent(QEvent::InvisibleOnScreenUpdate);
< QApplication::sendEvent( this, invisibleUpdateEvent );
< return;
< }
<
10625,10631d10590
< if( invisibleOnScreen() )
< {
< QEvent* invisibleUpdateEvent = new QEvent(QEvent::InvisibleOnScreenUpdate);
< QApplication::sendEvent( this, invisibleUpdateEvent );
< return;
< }
<
diff -r a\qwidget.h b\qwidget.h
223,224d222
< Q_PROPERTY(bool invisibleOnScreen READ invisibleOnScreen WRITE setInvisibleOnScreen)
<
717,719d714
< bool invisibleOnScreen() const;
< void setInvisibleOnScreen( bool invisible );
<
921,923d915
<
< private:
< bool m_invisibleOnScreen;
@