Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. updating UI while in debugger
Forum Updated to NodeBB v4.3 + New Features

updating UI while in debugger

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 4 Posters 681 Views 2 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.
  • M Offline
    M Offline
    mzimmers
    wrote on 18 Jun 2018, 21:56 last edited by
    #1

    Hi all -

    When debugging a UI in single step mode, I often find the UI doesn't update until I hit the "run" button. Can this behavior be altered?

    Thanks...

    J J 2 Replies Last reply 19 Jun 2018, 05:04
    0
    • M mzimmers
      18 Jun 2018, 21:56

      Hi all -

      When debugging a UI in single step mode, I often find the UI doesn't update until I hit the "run" button. Can this behavior be altered?

      Thanks...

      J Offline
      J Offline
      J.Hilk
      Moderators
      wrote on 19 Jun 2018, 05:04 last edited by
      #2

      @mzimmers
      afaik the ui is updated when the eventloop runs.

      As a hacky workaround, you could add QCoreApplication::processEvents inside the code block you want to debug, that should, in theory, update your ui.


      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.

      1 Reply Last reply
      1
      • M mzimmers
        18 Jun 2018, 21:56

        Hi all -

        When debugging a UI in single step mode, I often find the UI doesn't update until I hit the "run" button. Can this behavior be altered?

        Thanks...

        J Offline
        J Offline
        JonB
        wrote on 19 Jun 2018, 06:55 last edited by JonB
        #3

        @mzimmers
        Just so you know, all debuggers on all platforms (have to) work like this when debugging a UI-event-driven application. When stepping/running to next breakpoint, it executes only the instructions it comes across, and while they do not allow the UI to process events/repaint the visuals will remain "frozen". It actually shows you what what is really going on in your app!

        Like @J-Hilk says, only way is temporarily to insert necessary event processing lines into the code you happen to be stepping through. Not ideal for debugging, but a standard issue.

        1 Reply Last reply
        1
        • N Offline
          N Offline
          negar2000
          Banned
          wrote on 23 Jun 2018, 12:00 last edited by negar2000
          #4
          This post is deleted!
          1 Reply Last reply
          0

          4/4

          23 Jun 2018, 12:00

          • Login

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