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
Forum Updated to NodeBB v4.3 + New Features

Detect orientation y change background Image

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 717 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.
  • J Offline
    J Offline
    JREMIROMERO
    wrote on 26 Mar 2016, 01:45 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 26 Mar 2016, 10:08 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
      • J Offline
        J Offline
        JREMIROMERO
        wrote on 27 Mar 2016, 23:06 last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0

        1/3

        26 Mar 2016, 01:45

        • Login

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