Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How can I find a QWidget that pops up and goes away very quickly?
Forum Update on Monday, May 27th 2025

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 218 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.
  • A Offline
    A Offline
    allopis
    wrote on last edited by
    #1

    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-worxR 1 Reply Last reply
    0
    • A allopis

      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-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @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
      1
      • JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by
        #3

        Check the places where timers may be used

        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