Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Resize layout created in Qt for Android.
Hello everyone, I am programming in Android and I'm using C++ and Qt for create an app for android. The reason about this topic is that now I'm making an app for control Raspberry Pi from Android using UDP protocol.
I created a simple layout which send a signal to RPI using two push buttons, but when I create the buttons and run the program in my phone, I can see small push buttons and when I run the program in the Qt they have a normal size.
You can see the images in the below URLs.
I hope someone can help me to configure the layout or something. I am running the program in a LG-G3.
Thanks for all!!
You should put your buttons in a layout. That will take care of placing and sizing them more nicely.
Thanks for your answer. Is there any way to set a limit for the resize in the layout? That is because I don't want to a button in the full screen.
Do you mean you want to hide them when in full screen or just that they keep a reasonable size ?
Yes, reasonable size.
You can add spacer items to keep your buttons from expanding.
It depends partly on where and how you want to place them.
Qojote last edited by
You can set the sizePolicy of each element in a layout. Typically a button has a fixed vertical size and an expanding horizontal size (dont get confused with "minimum" and "expanding" size policy).
Maybe it is useful to take the Qt creator and create a simple application and play around with layouts...