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 Update on Monday, May 27th 2025

Native Android UI Elements in QML?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 449 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.
  • Backflip9B Offline
    Backflip9B Offline
    Backflip9
    wrote on 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
    0
    • Backflip9B Backflip9

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

      • Login

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