Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Design studio and Creator for Device creation (rPi/imx6 etc...) c++ backend issue
Forum Updated to NodeBB v4.3 + New Features

Design studio and Creator for Device creation (rPi/imx6 etc...) c++ backend issue

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
3 Posts 2 Posters 360 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.
  • D Offline
    D Offline
    deleted130
    wrote on last edited by deleted130
    #1

    Hello,

    I'm building my ui with design studio 1.4, and then using creator 4.12 to create my backend.
    I am deploying app via boot2qt.
    It works fine, I followed the various webinars and documents like :

    https://doc.qt.io/qt-5/qtqml-cppintegration-overview.html
    and
    https://doc.qt.io/qtdesignstudio/quick-converting-ui-projects.html

    My problem comes after I attached the backend in creator. If i want to modify the UI again in design studio, the import in the qml file that is linked to the qmlRegisterType<> in my main.cpp is not found of course, it is only found in creator.
    And thus, design studio doesn't render the qml file because of the error, so I cannot edit graphically.

    So what would be the best workflow?

    • completely finish the ui, then go in creator and doesn't look back or make only minor adjustements via the text editor?
    • find a way to tell design studio that the backend component exists and it can use it? (I would prefer this)

    Basically I have in main.cpp:

    qmlRegisterType<BackEnd>("dt.backend", 1, 0, "BackEnd");
    

    and in the qml loaded by the engine

    ...
    import dt.backend 1.0 // QML module not found
    
    Item {
        id: mainPage
        width: 1024
        height: 600
    
        BackEnd {
            id: backend
        }
    ...
    

    If anyone has an idea that would be awesome.
    Thank you.

    Edit:
    Could this be what I am looking for?
    https://doc.qt.io/qt-5/qtqml-modules-qmldir.html

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Thomas Hartmann
      wrote on last edited by
      #2

      The simplest solution is to create a simple QML mockup for your C++ backend.
      A simple example for this approach is the welcome page for Qt Design Studio: https://github.com/qt-creator/qt-creator/tree/master/src/plugins/studiowelcome/qml/welcomepage.

      In your case mockdata would contain a simple QML stub for dt.backend.

      1 Reply Last reply
      1
      • D Offline
        D Offline
        deleted130
        wrote on last edited by
        #3

        Hello Thomas,

        Thank you for your reply. I'll try this approach.

        Best Regards.

        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