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. Need to set NMEA position source in application configuration, Qt 6.6.
Qt 6.11 is out! See what's new in the release blog

Need to set NMEA position source in application configuration, Qt 6.6.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 1 Posters 575 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.
  • isstarI Offline
    isstarI Offline
    isstar
    wrote on last edited by isstar
    #1

    Hi. I have QWidgets application made in Qt Creator. It has multiple tabs of Ui, one of them is QQuickWidget, whith QML-map in it. GPS reciver connected to COM-port and NMEA data is getting by QML side. Everything is working, but I want to be able to set COM-port number without rebuilding the application. In Qt5 I passed COM-port number to QML side from QWidgetsSide using "setProperty()". But after migrating to Qt6 the "NMEA source" plugin paramemter became "write-once property". So I am confused with this situation.

    https://doc.qt.io/qt-6/qml-qtpositioning-pluginparameter.html

    Somehow, I need to pass COM-port number to the QML-object during its creation, but how to do it in Qt Creator?

    1 Reply Last reply
    0
    • isstarI Offline
      isstarI Offline
      isstar
      wrote on last edited by isstar
      #2

      This theme works for me:
      https://doc.qt.io/qt-6/qtqml-cppintegration-exposecppattributes.html
      But I have to edit function setupUi() in generated file ui_mainwindow.h.

      1 Reply Last reply
      0
      • isstarI Offline
        isstarI Offline
        isstar
        wrote on last edited by isstar
        #3

        Alternatively, I can organize collecting all NMEA data on QWidgets side and then passing ready coordinates to QML using "setProperty()". This way I can read config file before creating NMEA-plugin object.

        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