Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97033

REG->dev: Application hangs when calling close on hidden window via timer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Invalid
    • Affects Version/s: 6.3
    • Fix Version/s: None
    • Component/s: GUI: Window management
    • Labels:
      None
    • Platform/s:
      All

      Description

      I am not sure if this is a real bug or intended change of behaviour, but at f2de001d8410b85047ee40ebfff1b307a18889bb , the code

          QApplication a(argc, argv);
          QWidget w;
         //    w.show();
          QTimer::singleShot(0, &w, &QWidget::close);
          return  a.exec();
      

      hangs. Note the widget is not shown. The app terminates normally when calling show().

      The attached sample produces

      Qt 6.3.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 9.3.0)
      Timer running
      

      vs

      Qt 6.2.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 9.3.0)
      Timer running
      Exit 0
      

      Manifested in a Qt for Python test

        Attachments

        For Gerrit Dashboard: QTBUG-97033
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            vestbo Tor Arne Vestbø
            Reporter:
            kleint Friedemann Kleint
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes