Hello Kofa
"... it's not professional to write all these lines just to implement automatic scaling. ..."
"... the functions should be at the end of the code. .."
True. The program is 221 lines long
It was written in 2020-Jun-16 as a complete program when I was trying to figure out a few things.
It is presented as an Example GUI program
It shows Moving a Window around the Screen
It shows Resizing the Window
It shows Scaling the Output and Images automatically when dimensions are constantly changed
It shows how to Use QT to create/display the Display
The Functions are right where they should be - at the End of the Code
Functions can be put in Any Order -- because they are Called.
(P.S. the only thing worst than All Bold is All Capitals)
Regards
Bert Mariani