Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. Generate Android UI protoype, using c++ with Qt
QtWS25 Last Chance

Generate Android UI protoype, using c++ with Qt

Scheduled Pinned Locked Moved Brainstorm
c++user interfaceandroidqt 5.4.0
7 Posts 2 Posters 2.7k 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
    Javeria
    wrote on 20 Mar 2015, 07:42 last edited by
    #1

    I have an xml file that contains ui components and their respective parameters like position, coordinates , how can i use this xml file to generate an Andrioid UI prototype by c++?.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 20 Mar 2015, 07:49 last edited by
      #2

      That depends on the structure of that file. if it is a Qt .ui file, then you just need to plug it into any Qt GUI project and it will work.

      If you have an android UI file, then it is intended for Android's Java parser. To make it work in C++, you would have to choose a framework to work with, then transcode the XML to something that that framework understands

      (Z(:^

      J 1 Reply Last reply 20 Mar 2015, 10:23
      0
      • S sierdzio
        20 Mar 2015, 07:49

        That depends on the structure of that file. if it is a Qt .ui file, then you just need to plug it into any Qt GUI project and it will work.

        If you have an android UI file, then it is intended for Android's Java parser. To make it work in C++, you would have to choose a framework to work with, then transcode the XML to something that that framework understands

        J Offline
        J Offline
        Javeria
        wrote on 20 Mar 2015, 10:23 last edited by
        #3

        @sierdzio My program is a QT application and by Android ui file do you the xml layout?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 20 Mar 2015, 10:27 last edited by
          #4

          I mean that XML is versatile and a lot of languages, frameworks and system use it to define interfaces. I do not know in which format your XML file is saved, so I also can't tell you how to convert it to C++. And I do not know why you need it: Qt already has 2 built-in UI frameworks (QtWidgets and QtQuick) which can be used not only to prototype, but also actually develop applications on Android.

          (Z(:^

          J 1 Reply Last reply 20 Mar 2015, 10:32
          0
          • S sierdzio
            20 Mar 2015, 10:27

            I mean that XML is versatile and a lot of languages, frameworks and system use it to define interfaces. I do not know in which format your XML file is saved, so I also can't tell you how to convert it to C++. And I do not know why you need it: Qt already has 2 built-in UI frameworks (QtWidgets and QtQuick) which can be used not only to prototype, but also actually develop applications on Android.

            J Offline
            J Offline
            Javeria
            wrote on 20 Mar 2015, 10:32 last edited by
            #5

            @sierdzio Yeh u r right , my xml file is a simple layout that has been created from an image that contains sketched UI components, and i want to create an Android UI prototype using the information saved in this xml file, could you guide me on this as how i can generate UI code using Qt?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sierdzio
              Moderators
              wrote on 20 Mar 2015, 10:34 last edited by
              #6

              No, sorry, you are just too vague.

              You can use QXmlStreamReader to parse your XML. Then, how you continue, is entirely up to you.

              Myself, I would just use QML and QtQuick to rapidly prototype the application. It's a great tool for such purposes.

              (Z(:^

              J 1 Reply Last reply 20 Mar 2015, 10:36
              0
              • S sierdzio
                20 Mar 2015, 10:34

                No, sorry, you are just too vague.

                You can use QXmlStreamReader to parse your XML. Then, how you continue, is entirely up to you.

                Myself, I would just use QML and QtQuick to rapidly prototype the application. It's a great tool for such purposes.

                J Offline
                J Offline
                Javeria
                wrote on 20 Mar 2015, 10:36 last edited by
                #7

                @sierdzio Sorry my bad, i mean i want to programmatically generate Android UI prototype

                1 Reply Last reply
                0

                4/7

                20 Mar 2015, 10:27

                • Login

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