Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Native Android UI Elements in QML?
Forum Updated to NodeBB v4.3 + New Features

Native Android UI Elements in QML?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 461 Views 2 Watching
  • 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.
  • B Offline
    B Offline
    Backflip9
    wrote on 17 Apr 2019, 16:30 last edited by Backflip9
    #1

    Hi all,

    I'm working on porting a widgets application to QML for Android support, and I was unable to find any good resources on how to make the UI elements appear the same as they do on other Android apps that were built from scratch with Java. Example:
    alt text

    When I run my QML app on an android emulator, they look like this:

    alt text

    Additionally, the size of my UI elements seems to be way larger than I intend no matter what I do. Does the window size in the QML editor have to match the screen size of the emulator? Or is there a way to make QML scale for the device it's being run on?
    As you can see from this example, the buttons are much smaller in the QML editor.

    alt text

    Any idea how I can at least make the buttons appear as they do in the editor?

    Thanks!

    T 1 Reply Last reply 17 Apr 2019, 21:13
    0
    • B Backflip9
      17 Apr 2019, 16:30

      Hi all,

      I'm working on porting a widgets application to QML for Android support, and I was unable to find any good resources on how to make the UI elements appear the same as they do on other Android apps that were built from scratch with Java. Example:
      alt text

      When I run my QML app on an android emulator, they look like this:

      alt text

      Additionally, the size of my UI elements seems to be way larger than I intend no matter what I do. Does the window size in the QML editor have to match the screen size of the emulator? Or is there a way to make QML scale for the device it's being run on?
      As you can see from this example, the buttons are much smaller in the QML editor.

      alt text

      Any idea how I can at least make the buttons appear as they do in the editor?

      Thanks!

      T Offline
      T Offline
      Tom_H
      wrote on 17 Apr 2019, 21:13 last edited by
      #2

      @Backflip9 I've never used the graphical Designer, but if you set the Quick Controls style to Material, you'll get widgets that look like native Android ones.

      1 Reply Last reply
      1

      1/2

      17 Apr 2019, 16:30

      • Login

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