Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Help with QML accessing C++
Forum Updated to NodeBB v4.3 + New Features

Help with QML accessing C++

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 349 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    I am working on a very large project that uses a lot of QML and C++. Unfortunately and rather amazingly there is absolutely no documentation to back up the source code or design.

    So I am in the very painful situation of having to work it out as I go along. I'm not that experience with QML. The QML uses references like vehilcle.data then accesses more information off that.

    Can anyone help me to identify what to look for in the C++ that might help me track down what is being accessed? I also need to add more functionality and would like to implement a call to a C++ function, but until I can established where its coming from I can't really begin.

    Kind Regards,
    Sy

    1 Reply Last reply
    0
    • JoeCFDJ JoeCFD

      @SPlatten Check if it inherits any other class.

      SPlattenS Offline
      SPlattenS Offline
      SPlatten
      wrote on last edited by
      #5

      @JoeCFD , I found out today that there is some hidden magic that goes on in the application where a lot of the configuration occurs in another XML style file.

      Kind Regards,
      Sy

      1 Reply Last reply
      0
      • JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by JoeCFD
        #2

        In my qml code I have

                Image {
                    source:   generalSettings.wireConnectionState ? "/res/wireconnected" : "/res/wiredisconnected"
                }
        

        generalSettings is an instance of C++ class GeneralSettings
        wireConnectionState is a function of instance generalSettings which returns a bool

        in your code it is likely vehicle is an instance of C++ class Vehicle and data is function of Vehicle

        SPlattenS 1 Reply Last reply
        0
        • JoeCFDJ JoeCFD

          In my qml code I have

                  Image {
                      source:   generalSettings.wireConnectionState ? "/res/wireconnected" : "/res/wiredisconnected"
                  }
          

          generalSettings is an instance of C++ class GeneralSettings
          wireConnectionState is a function of instance generalSettings which returns a bool

          in your code it is likely vehicle is an instance of C++ class Vehicle and data is function of Vehicle

          SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by
          #3

          @JoeCFD , thank you, that makes sense, however i cannot see in the source I have where data is a function of vehicle.

          Kind Regards,
          Sy

          JoeCFDJ 1 Reply Last reply
          0
          • SPlattenS SPlatten

            @JoeCFD , thank you, that makes sense, however i cannot see in the source I have where data is a function of vehicle.

            JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by
            #4

            @SPlatten Check if it inherits any other class.

            SPlattenS 1 Reply Last reply
            0
            • JoeCFDJ JoeCFD

              @SPlatten Check if it inherits any other class.

              SPlattenS Offline
              SPlattenS Offline
              SPlatten
              wrote on last edited by
              #5

              @JoeCFD , I found out today that there is some hidden magic that goes on in the application where a lot of the configuration occurs in another XML style file.

              Kind Regards,
              Sy

              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