Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to set Auto resize GUI in Qt depending on the screen size
I am new to QT. actually,i developed a application. the problem is my application should run in different desktop.so,for that i want to set auto resize the GUI based on Desktop screen size. Is there any function in QT to auto resize the GUI? Thanks in Advance!!!
Just use proper layouting and Qt will do the rest for you: http://doc.qt.io/qt-5/layout.html
Robert Hairgrove last edited by
@im_vidhya - Look at the QScreen class. There are functions to give you the available screen size, for example.
But if you do the layout correctly, as Christian pointed out, then the user can resize the windows just about any way they want without problems. Qt layouts take care of the rest. I only use the information from QScreen to show my main windows in a reasonable initial default size, centered on the screen.
@Robert-Hairgrove Thankyou It's Working.
@Christian-Ehrlicher Thankyou It's Working