Hi Reiji,
Are you using layouts?
See documentation here.
Layout describes how widgets are laid out in an application's user interface, so in order to get the widgets showed in the available space use any Layout in your .ui or programmatically in the .cpp.
Wilkinson Tavares
Now it fits my display on my android device. I just need to design in a very big size at the computer.
Last edited by Reiji; 26th May 2015 at 13:21.
Sure,
This video shows how to do it in the cpp.
If you're using Qt Creator and you have a form file (.ui), in the design mode it has Layouts on the left sidebar, just drag and drop one of them and put the widgets you want inside it.
Best regards
Reiji (26th May 2015)
My phone has a big resolution but not my screen of my computer. Does anyone know if there is a possibility to let fit the application at every phone screen resolution (not only for my phone resolution)?
Last edited by Reiji; 26th May 2015 at 15:00.
Hi Reiji,
You should use some kind of density-independent pixel (dp) to get an application that displays properly in an range of resolutions.
See Qt documentation here.
Calculating Scaling Ratio
You can select one high DPI device as a reference device and calculate a scaling ratio for adjusting image and font sizes and margins to the actual screen size.
See Android guides here.
EDIT:
However Reiji, your problem may be a lack of a layout in your central widget or this.
Last edited by wtfm; 27th May 2015 at 12:44.
Best regards
Not that I know of, but is pretty simple.
Read the documentation that I posted above to get a clue, mainly the scaling ratio part, and this post can help you as well.
Best regards
I'm useing a QT Widget(C++) and for the interface an ui file created with the Formdesigner. So how can I use the dp thing which is written in qml?
Bookmarks