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. Starting to use qtquick and qml from an existing Qt Gui Application

Starting to use qtquick and qml from an existing Qt Gui Application

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 1.3k Views 1 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.
  • K Offline
    K Offline
    koolbi
    wrote on last edited by
    #1

    I have a Qt Gui Application for android that is using widgets for the current ui and I was wondering what would be the best way to change to using QtQuick and qml for the ui? I dont want to create a new project I just want to change the ui. Thank you!

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      There is not direct way to change your widget to QML ui. You need to code it separately.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koolbi
        wrote on last edited by
        #3

        @Dheerendra this I know. I was wandeing how to get qml code to run under android that I could call from the existing program to use the qml as the ui instead of the widgets.

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          Hi,

          I recommend creating a new Qt Project for Android, and then studying the files that are auto-generated for you. After that,

          Back up your old project

          Copy the files from the new project into your old project

          Merge the new .pro file with your old .pro file

          Merge the new main() function into your old main() function -- replace QApplication (this is for QWidgets) with QGuiApplication (this is for general GUIs)

          Reimplement your UI in the sample QML file

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          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