you can get the Screen Resolution with QRect rec = QApplication::desktop()->screenGeometry() and at the start up of your program you can set the size of the window that you want. maybe a percentage value.

@Fuel ok but if i work with two different screen a primary and a secindary how I can adjust the layout of QMainWindow when I put the application from the primary screen to the secondary. Look the different result in the two different image: 1 in the primary screen and 2 in the secondary I want
to avoid this effect