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 to render focus indicators in an offscreen window?
Qt 6.11 is out! See what's new in the release blog

How to render focus indicators in an offscreen window?

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

    Hi,

    I'm trying to implement a custom user interface in virtual reality using Qt. I'm using QQuickRenderControl to render some UI defined in QML into an OpenGL framebuffer.
    The resulting texture is drawn onto a quad in my custom OpenGL scene. Mouse events are simulated using the motion controllers.

    This all works great, but I cannot render the UI in an "active" or "focused" style. For example, if I activate a text field, there is no cursor and no blue outline, because the offscreen window (a QQuickWindow) is not considered an active window. It's never actually shown on the desktop - it only exists in memory.

    If I force the window to be shown on the desktop and make it the front window of the application, then the active text field is rendered correctly with the focus outline and the cursor within the VR scene. However, I would like to avoid having to show this window on the desktop (it renders as an empty white window).

    Is there a way to force a QQuickWindow to render as if it was the front window, even if that's not the case? Thanks!

    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