c++ - Qt moving a QWidget without triggering the moveEvent method? -
i trying set widget remain fixed @ location created , never move. doing setting position old position in overridden moveevent
method. problem way move to...call move
, triggers moveevent
, entering infinite loop. there way set position directly , bypass events?
bool m_firsttimemove; // class member qmywidget qmywidget::qmywidget(qobject* parent) : qwidget(parent), m_firsttimemove(true) { } void qmywidget::moveevent(qmoveevent* event) { if (m_firsttimemove) { onlyforfirsttimemove(); // 1 time move action m_firsttimemove = false; } event->accept(); }
Comments
Post a Comment