Resizing QMainWindow and QDialog
-
wrote on 6 Oct 2017, 16:02 last edited by Ocram10 10 Jun 2017, 16:09
Hello,
I would like to know if it is possible to resizing automatically the QMainWindow depending on the Windows' property "resizing and layout" (a sort of zoom) of the desktop..
Thanks -
Hi
Layouts only resizes widgets inside the window.It sounds like you want to resize the actual window but what/how does user do it ?
-
wrote on 9 Oct 2017, 07:35 last edited by
hi,
i want that the application being adaptive to the resolution and the layout of the available desktop whitout the user's work -
hi,
i want that the application being adaptive to the resolution and the layout of the available desktop whitout the user's work -
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.
wrote on 9 Oct 2017, 07:49 last edited by@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
-
@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
-
you mean when you pull the window from the screen to the other screen? i dont think that its possible. maybe if there is an event that get triggered when you switch screens.
7/7