Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT for Various Platforms.
Forum Updated to NodeBB v4.3 + New Features

QT for Various Platforms.

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
androidios
4 Posts 2 Posters 1.1k 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.
  • M Offline
    M Offline
    Mathan M
    wrote on last edited by
    #1

    Hi All,
    I am planning to develop and mobile app which target andorid/iOS/Windows mobile/tablet devices.
    I am planning to use QT as IDE.
    I need some clarifications in this regard. According to my understanding, Qml will be the Front-end and C++ [.cpp.h] will be the Business Logic layer.

    Queries:

    1. Is different qml has to be developed for iOS and Android, Since .pro structure shows separate folder for iOS and separate folder for Android.
      2.I was thinking write once and deploy it in multiple devices. But the structure seems to be, Qml has to be design for android say LoginAndroid.qml or LoginiOS.qml or LoginWindows.qml. Am I wrong in this concept.
    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      "Write once, deploy everywhere" is correct. But you can of course have platform specific parts in your code if you want. And in seldom, unfortunate cases, e.g. when there is a platform specific bug in Qt, you might even have to maintain a platform specific workaround in your code.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mathan M
        wrote on last edited by
        #3

        Hello Moderator,

        Thanks for the reply.

        Scenario 1:
        Lets say If I am creating LoginPage then Do I need to write LoginAndroid.qml/LoginiOS.qml/LoginWindows.qml and logic will be written in common .cpp/.h files.

        Scenario 2:
        Platform specific functionalities like sensors, code has to written like Sensorsandroid.qml/SensorsiOS.qml as well as
        SensorsAndroid.Cpp and SensorsiOS.Cpp. The folder structure and logic separation will based on the platform specific?

        Thanks in advance.

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by A Former User
          #4

          @Mathan-M said:

          Lets say If I am creating LoginPage then Do I need to write LoginAndroid.qml/LoginiOS.qml/LoginWindows.qml and logic will be written in common .cpp/.h files.

          You can do this if you want, but you don't have to. A single Login.qml for all platforms is enough.

          The folder structure and logic separation will based on the platform specific?

          Yes, you can organize you folders / files in that way, but again you don't have to. The build process is controlled by your project file (*.pro). A program named "qmake" takes that project file and then generates the neccessary make files etc. You can read more about folder structures and source file organization in the qmake Manual.

          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