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

window->isActive() always returns false for QWindow::fromWinId()

    XMLWordPrintable

Details

    Description

      That's an obstacle for the keyboard focus.

      The use case is the integration of a QtQuick GUI into existing OpenGL application by using the QQuickRenderControl. The QQuickWindow is rendered into the QWindow obtained from QWindow::fromWinId().

      Keyboard input focus doesn't work because there is no focused window: QGuiApplication::focusWindow() == 0.

      If either QQuickWindow or foreign window could make it to be the focus_window of the application, the input events through QCoreApplication::sendEvent() would trigger a correct behaviour in QQuickWindow.

      Attachments

        1. qt-sdl.zip
          6 kB
        2. qt-sdlwin32mingw.zip
          663 kB
        3. qt-sdl-x11-win32.zip
          6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sletta Gunnar Sletta
            Velkan Velkan S
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes