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

activateWindow() does not work Mac OS X - broken since Qt 4.8

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P2: Important P2: Important
    • None
    • 5.0.0 Beta 2
    • GUI: Window management
    • None
    • OS X 10.7 and 10.8. XCode 4.5.2.
    • macOS

      This is a follow up on Qt bug 28276 submitted last week. I suspect there has been a communication failure, because the problem with activateWindow() is still present. I've downloaded the latest git repository version of Qt, built and tested against that as well as against beta 2. (I'm new to git, so can't tell you exactly which version I have). I've tested under OS X 10.7 and 10.8, and the problem is seen consistently.

      The attached project demonstrates the problem. It is a slightly modified version of the Qt example named sdi (single document interface).

      The application works as expected when built with Qt 4.8, but not with Qt 5.0.

      I've added a global variable "firstTextEdit" that stores a pointer to the QTextEdit created in the first opened window.

      I've also added a new action / menu item "Show First Window" which connects to a slot "showFirstWindow"...

      void MainWindow::showFirstWindow()
      {
      if ( firstTextEdit != NULL )

      { firstTextEdit->activateWindow(); }

      }

      To demonstrate the problem, run the application and select File -> New, then File -> Show First Window.

      The first window is NOT brought to the front and activated. The second window remains on top and active.

      Oddly, the text insertion cursor starts flashing in the QTextEdit of the first window, but typing adds text to the second window.

      Thanks for your help with this.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            dedietri Gabriel de Dietrich (drgvond)
            johnc3 John Clements
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes