Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Detect orientation y change background Image
Qt 6.11 is out! See what's new in the release blog

Detect orientation y change background Image

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 769 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • JREMIROMEROJ Offline
    JREMIROMEROJ Offline
    JREMIROMERO
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mvuori
      wrote on last edited by
      #2

      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).

      1 Reply Last reply
      0
      • JREMIROMEROJ Offline
        JREMIROMEROJ Offline
        JREMIROMERO
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved