PDA

View Full Version : Getting new label coordinates



ebsaith
25th June 2013, 10:26
Not familiar with the resizeEvent

1)How do I get window size or label size after ResizeEvent?
2)Is resizeEvent called on its own?
3)What are the resizeEvent functions (.width() ?, .length() ?, ...)
4)How do I compare the original size of label to the new size and adjust painter accordingly
Once Ifigure that out
5)How do I call a paintEvent from inside Resize event
to repaint accordingly

Please assist
Ideas Welcome
& example code most Welcome

Kind Regards

HelderC
25th June 2013, 12:54
1) check the geometry property[1].
2) Yes, its called every time Widget is resized.

[1] http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#geometry-prop

Check this also http://qt-project.org/doc/qt-5.0/qtwidgets/qwidget.html#resizeEvent