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. Working in Creator and Design Studio simultanously: C++ backend integration possible?

Working in Creator and Design Studio simultanously: C++ backend integration possible?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 514 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.
  • R Offline
    R Offline
    Raphael_PF
    wrote on 20 Jun 2023, 13:14 last edited by
    #1

    Hello there,
    I am working on a GUI-Project (Design Studio) with a C++ backend. While the first is only worked on in DS (no application logic) the latter one ist worked on only in Creator.
    I have spent DAYS already reading various docs like this: https://doc.qt.io/qt-6/qtqml-index.html with all corresponding articles. I watched several tutorials on C++-QML-Integration, tried several example projects. There is even a blogpost on how easy handling of QML modules has become in Qt 6 (https://www.qt.io/blog/qml-modules-in-qt-6.2).
    But still the problem remains:

    • All docs and tutorials are nice, but they seem only to be valid for either an older Qt-Version (e.g. 5) or not for a hybrid-DS-Creator project.

    To clarify a bit:

    • GUI starts nicely from DS
    • "export" form there works
    • Compiling in Creator WITHOUT any custom c++ code works, app starts just the same as from DS
    • now I want to add a singleton-interface class to work with in DS (!)
    • end of line...

    I must say that I am not a Cmake or QML-deep-dive-into-its-engine geek - rather basic knowledge, but I think this should be working without too much pain, shouldn't it?
    So @Qt_company: Why is there not a single proper tutorial on how to integrate C++ backends in a DS-QML-project?
    Is it not possible? Not intended workflow?

    Thanks for any comments, positive or negative.

    N 1 Reply Last reply 25 Jan 2024, 10:51
    0
    • R Raphael_PF
      20 Jun 2023, 13:14

      Hello there,
      I am working on a GUI-Project (Design Studio) with a C++ backend. While the first is only worked on in DS (no application logic) the latter one ist worked on only in Creator.
      I have spent DAYS already reading various docs like this: https://doc.qt.io/qt-6/qtqml-index.html with all corresponding articles. I watched several tutorials on C++-QML-Integration, tried several example projects. There is even a blogpost on how easy handling of QML modules has become in Qt 6 (https://www.qt.io/blog/qml-modules-in-qt-6.2).
      But still the problem remains:

      • All docs and tutorials are nice, but they seem only to be valid for either an older Qt-Version (e.g. 5) or not for a hybrid-DS-Creator project.

      To clarify a bit:

      • GUI starts nicely from DS
      • "export" form there works
      • Compiling in Creator WITHOUT any custom c++ code works, app starts just the same as from DS
      • now I want to add a singleton-interface class to work with in DS (!)
      • end of line...

      I must say that I am not a Cmake or QML-deep-dive-into-its-engine geek - rather basic knowledge, but I think this should be working without too much pain, shouldn't it?
      So @Qt_company: Why is there not a single proper tutorial on how to integrate C++ backends in a DS-QML-project?
      Is it not possible? Not intended workflow?

      Thanks for any comments, positive or negative.

      N Offline
      N Offline
      nandanVV
      wrote on 25 Jan 2024, 10:51 last edited by
      #2

      @Raphael_PF
      Hi Raphael,
      Hope all is well,
      I am facing the same issue you are as well
      Were you able to figure out how to do implement this?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Raphael_PF
        wrote on 25 Jan 2024, 13:25 last edited by
        #3

        Hi,
        here is what I did:
        I hired a professional software company, that develops GUIs in QT everyday, for a 2-hour video call to help me.
        They don't work with DS at all because (1) it allegedly produces bad code (or rather: not sufficient for their standard, and (2) they regard DS as a marketing strategy.
        Since I insistet on using DS they worked on my questions for a while and came back with this:
        DS is not able to detect e.g. type registering outside of its small horizon, so an own C++- backend connection is not recognized.

        So here is my current workflow:

        • working in DS as desired. I can use the various GUI-tools, like property overview on a nice tab, graphical arrangement, editor for states and so on. Especially handy when working on 3D-stuff, I think.

        • Don't worry about QML-Errors of undetected types form the backend. On runtime it'll be fine.

        • be careful with changing auto-created files by DS!

        • SAVE and EXPORT PROJECT (rewriting Cmake etc.)

        • RELOADING Project in QTC (detects change in Cmake automatically)

        • Coding in C++ as usual, using Q_PROPERTY etc. for backend connection to GUI

        • COMPILE ONLY HERE

        • "Play"-Button or Live-Preview in DS does not work.

        Though this is not my dream version I can live with this. Any improvements welcome.

        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