Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved How can I find a QWidget that pops up and goes away very quickly?

    General and Desktop
    3
    3
    111
    Loading More Posts
    • 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
      allopis last edited by

      In some part of my code (which is quite big) some kind of QWidget or QDialog is being created and shown floating on screen but it very quickly goes away and I cannot find where it comes from. in the code

      I have tried attaching a gdb debugger and setting breakpoints in different places:
      QDialog::QDialog(), QDialog::showEvent()
      QWidget::QWidget(), QWidget::showEvent()
      QWidget::repaint, etc...

      but I cannot find the exact place in my code where this widget is being created. It must be somewhere where a widget is created without parent. What can I do to find it ? Is it possible to instrument Qt to stop when a widget is being shown on screen?

      Thanks

      raven-worx 1 Reply Last reply Reply Quote 0
      • raven-worx
        raven-worx Moderators @allopis last edited by

        @allopis
        install an eventfilter on your qApp instance and set a breakpoint for objects/widgets which get a ShowEvent and inspect the callstack.
        Depending on your code this might already give a close clue to where it comes from.

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply Reply Quote 1
        • JoeCFD
          JoeCFD last edited by

          Check the places where timers may be used

          1 Reply Last reply Reply Quote 0
          • First post
            Last post