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. Reseting QML file
Forum Updated to NodeBB v4.3 + New Features

Reseting QML file

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 2 Posters 1.7k 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.
  • E Offline
    E Offline
    Ever
    wrote on last edited by
    #1

    Hello Qt community,

    My idea is that I would like to put the .qml file in beginig state after onclick event.
    It is good for refresing data after changes in database.

    Can it be done in QML or I must go in C++?

    The roots of education are bitter, but the fruit is sweet.

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

      To set the state back to default just run this:
      @
      state = ""
      @

      (Z(:^

      1 Reply Last reply
      0
      • E Offline
        E Offline
        Ever
        wrote on last edited by
        #3

        This isn't working for me.

        I will try to send signal to main file and reload page from C++.

        The roots of education are bitter, but the fruit is sweet.

        1 Reply Last reply
        0
        • E Offline
          E Offline
          Ever
          wrote on last edited by
          #4

          I'm struggling about reloading data to model after onclick event.
          Can you give me any suggestions?

          The roots of education are bitter, but the fruit is sweet.

          1 Reply Last reply
          0
          • E Offline
            E Offline
            Ever
            wrote on last edited by
            #5

            I found solution.
            Because I'm using C++ to generate model data QML can't see changes.
            Method setContextProperty in C++ must be called again.

            The roots of education are bitter, but the fruit is sweet.

            1 Reply Last reply
            0
            • E Offline
              E Offline
              Ever
              wrote on last edited by
              #6

              I wonder how to pass QmlApplicationViewer from main.cpp to slot?

              The roots of education are bitter, but the fruit is sweet.

              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