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