Detect orientation y change background Image
Unsolved
Mobile and Embedded
-
wrote on 26 Mar 2016, 01:45 last edited by
Hi everyone, I'm learning to develop applications for android qt, and i tried to do a login dialog, i create 2 png, one of them with vertical orientation and another horizontal,
I need you when the phone or tablet change orientation, it's change background and resize and reorder 2 QLineEdit and 1 QPushbutton. Sorry my bad english ,I hope explained well, Thank you -
wrote on 26 Mar 2016, 10:08 last edited by
You have your dialog class derived from QDialog and you should have a custom paintEvent() defined for it. When the orientation changes you will get your paintEvent() called. There you can check the dimensions of your dialog, compare height and with and paint the background appropriately. The size should reflect the orientation if your dialog is fullscreen).
-
wrote on 27 Mar 2016, 23:06 last edited byThis post is deleted!
1/3