Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Updating Json without restarting
Forum Updated to NodeBB v4.3 + New Features

Updating Json without restarting

Scheduled Pinned Locked Moved Solved Qt for Python
5 Posts 3 Posters 623 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.
  • W Offline
    W Offline
    WolkenVacht
    wrote on last edited by
    #1

    Hello!

    My name is Bart and i am a developer / ethical hacker for an organisation named Computest. I am currently working on our open-source tool Compuracer (https://github.com/computestdev/CompuRacer) but I have a problem. The tool works that it updates json files everytime something changes. I made a GUI in PyQt5 and wanted to make it dynamic so when json reloads it does not need to restart the complete GUI like it is doing right now. How do I do this? How do I make the GUI reload all the data again without having a 1 second blackscreen because of reloading the GUI per 10 seconds? You can check the code I have now in /Compuracer_Core/src/gui.py

    Kind Regards,
    Bart van Wijk
    @Computest

    JonBJ 1 Reply Last reply
    0
    • W WolkenVacht

      Hello!

      My name is Bart and i am a developer / ethical hacker for an organisation named Computest. I am currently working on our open-source tool Compuracer (https://github.com/computestdev/CompuRacer) but I have a problem. The tool works that it updates json files everytime something changes. I made a GUI in PyQt5 and wanted to make it dynamic so when json reloads it does not need to restart the complete GUI like it is doing right now. How do I do this? How do I make the GUI reload all the data again without having a 1 second blackscreen because of reloading the GUI per 10 seconds? You can check the code I have now in /Compuracer_Core/src/gui.py

      Kind Regards,
      Bart van Wijk
      @Computest

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @WolkenVacht
      Qt does not use JSON files for its UI definition. If you use JSON for some purpose of your own and change it it's up to you what you do about "reloading", we don't know why you make it "restart the complete GUI like it is doing right now".

      W 1 Reply Last reply
      1
      • JonBJ JonB

        @WolkenVacht
        Qt does not use JSON files for its UI definition. If you use JSON for some purpose of your own and change it it's up to you what you do about "reloading", we don't know why you make it "restart the complete GUI like it is doing right now".

        W Offline
        W Offline
        WolkenVacht
        wrote on last edited by
        #3

        @JonB
        Thanks for your reply. I make it right now like that because I dont know how to make the GUI reload by itself without restarting. As I said in my early message, I want it to just reload the data every 5 seconds or 10 seconds, so reading the file out again and change the data in the table to the new data. Is this possible? I tried many things but it did not work.

        J.HilkJ 1 Reply Last reply
        0
        • W WolkenVacht

          @JonB
          Thanks for your reply. I make it right now like that because I dont know how to make the GUI reload by itself without restarting. As I said in my early message, I want it to just reload the data every 5 seconds or 10 seconds, so reading the file out again and change the data in the table to the new data. Is this possible? I tried many things but it did not work.

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @WolkenVacht said in Updating Json without restarting:

          Is this possible? I tried many things but it did not work.

          yes its possible. I did it many time and it did work.


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          W 1 Reply Last reply
          0
          • J.HilkJ J.Hilk

            @WolkenVacht said in Updating Json without restarting:

            Is this possible? I tried many things but it did not work.

            yes its possible. I did it many time and it did work.

            W Offline
            W Offline
            WolkenVacht
            wrote on last edited by
            #5

            @J-Hilk
            Thanks for your reply, it works right now when. I had the wrong function x). Thanks for both your help and time!

            Have a good day

            Kind Regards,
            Bart van Wijk

            1 Reply Last reply
            0
            • W WolkenVacht has marked this topic as solved on

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved