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. Use Qt Designer or QML for Graphical User Interface?
Forum Update on Monday, May 27th 2025

Use Qt Designer or QML for Graphical User Interface?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 2 Posters 1.5k 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.
  • D Offline
    D Offline
    Damalo_02
    wrote on 5 Apr 2019, 10:01 last edited by
    #1

    Hello,

    I'm trying to do a Windows and an Android app wtih the same Graphic User Interface.

    For the Windows app, I used Qt Designer, but when I try to launch the app on Android I get the following error "member access into incomplete type "Ui::mainwindow".

    I saw a lot of tutorials on internet where QML and JavaScript is used for Android app.

    So do I need to use Qt Designer, or QML? Also what is the difference between a QML File (.qml) and a QtQuick UI File (.ui.qml)?

    Thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 5 Apr 2019, 13:41 last edited by
      #2

      What you refer to by "Qt Designer" is a UI based on Qt Widgets module.

      I get the following error "member access into incomplete type "Ui::mainwindow".

      That's a compilation error. Make sure your .ui file is added to FORMS qmake variable (in your .pro file), run qmake and rebuild your project.

      So do I need to use Qt Designer Widgets, or QML?

      Both should work on Android. QML is much better suited for mobile platforms, touch displays, animations etc. so it is usually preferred over QtWidgets on mobiles - but it's not a requirement.

      Also what is the difference between a QML File (.qml) and a QtQuick UI File (.ui.qml)?

      .ui.qml is used by Qt QML Designer when you create the UIs in the wysiwyg editor. The .ui.qml contains UI definitions, while the corresponding .qml all the UI logic.

      From perspective of QML engine, .ui.qml is a normal QML file.

      My personal, 100% biased opinion: .ui.qml approach is rubbish ;-) I very strongly prefer coding in "normal" QML files. But I usually write QML code by hand - that's why for me the .ui.qml makes no sense.

      (Z(:^

      1 Reply Last reply
      1
      • D Offline
        D Offline
        Damalo_02
        wrote on 5 Apr 2019, 14:59 last edited by
        #3

        Thanks a lot for your answer. I have one last question, can I use QML for Windows app? Or is it more convenient to use Qt Widgets module?

        S 1 Reply Last reply 6 Apr 2019, 15:43
        0
        • D Damalo_02
          5 Apr 2019, 14:59

          Thanks a lot for your answer. I have one last question, can I use QML for Windows app? Or is it more convenient to use Qt Widgets module?

          S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 6 Apr 2019, 15:43 last edited by
          #4

          @Damalo_02 said in Use Qt Designer or QML for Graphical User Interface?:

          Thanks a lot for your answer. I have one last question, can I use QML for Windows app? Or is it more convenient to use Qt Widgets module?

          You can use QML on Windows (and any other desktop platform).

          About convenience - well depends. If you already have a QML app written for mobiles, then running the same code on Windows is the easiest and most convenient way. Or, in some cases (depends on UI design) you may want to create a variant of your QML code better suited for desktops.

          If you don't have plans to support mobile platforms, then QtWidgets are a very good option for desktops.

          Yeah, so unfortunately there is no easy answer here ;-) You can use either QtWidgets or QtQuick (another name for QML) on all platforms. Which suits your needs better depends on details of the task, and on personal preference.

          (Z(:^

          1 Reply Last reply
          2
          • D Offline
            D Offline
            Damalo_02
            wrote on 8 Apr 2019, 07:17 last edited by
            #5

            Thanks a lot for these great explanations.

            1 Reply Last reply
            0

            1/5

            5 Apr 2019, 10:01

            • Login

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