Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to reuse widget dimesions ?
AnneRanch last edited by
This should be part of C++ philosophy to "code once , use many times ".
BUT QRect is "private " in widget.
Any reasonable answers to the question are welcome.
Form_Widget *FW = new Form_Widget(); QRect dimensions = FW->geometry(); int start_X = dimensions.x2; //can't do, its private
QRect is a class, not a struct so you should use it's members to get the values you want.