Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. Read xml file in QML
Forum Updated to NodeBB v4.3 + New Features

Read xml file in QML

Scheduled Pinned Locked Moved India
7 Posts 3 Posters 5.8k 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.
  • A Offline
    A Offline
    athavan
    wrote on last edited by
    #1

    How to write the xml file from qml code

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You need to use C++ for that.

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        athavan
        wrote on last edited by
        #3

        thank u for rply.. can you give some example for that...

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          [quote author="athavan" date="1396438365"]thank u for rply.. can you give some example for that...[/quote]

          I could, but the documentation already has all the data. See "this":http://qt-project.org/doc/qt-5/xml-streaming.html, "this":http://qt-project.org/doc/qt-5/qdomdocument.html.

          (Z(:^

          1 Reply Last reply
          0
          • A Offline
            A Offline
            athavan
            wrote on last edited by
            #5

            thank u for reply... but in my project I want update the config.xml file from .qml file.... there is any other way to achieve this..

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              No. QML does not have an API for modifying XML files. You need to use C++ for that (or some external JS library).

              (Z(:^

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by
                #7

                Using contextProperty() you can easily connect C++ class inside QML files. Call the C++ functions for read/write XML files.
                check this, http://qt-project.org/doc/qt-5/qqmlcontext.html#setContextProperty

                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