Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QWindow won't give up its active focus
Qt 6.11 is out! See what's new in the release blog

QWindow won't give up its active focus

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 368 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.
  • I Offline
    I Offline
    isudfv
    wrote on last edited by
    #1

    I'm trying to embed a CEF window to a qml window. It now looks like this. enter image description here
    When embedding, I set the parent window of CEF window(QWindow for now) to the qml window, and modify its position. I can't think of a better solution. It looks nice though.

    The problem is that the embeded QWindow won't give up its active focus. Once I clicked the embeded QWindow, activeFocusItem is set to null and no longer able to change

    onActiveFocusItemChanged: {
        console.log(activeFocusItem)
    }
    // activeFocusItem changes whenever I click a item
    qml: TextField_QMLTYPE_8(0x23363645080)
    qml: TabButton_QMLTYPE_1(0x2336370a700)
    qml: TabButton_QMLTYPE_1(0x233638b2710)
    qml: TextField_QMLTYPE_8(0x23363645080)
    qml: TabButton_QMLTYPE_1(0x2336370a700)
    qml: TabButton_QMLTYPE_1(0x233638b2710)
    // clicked the QWindow, it no longer changes
    qml: null
    

    code can be found here

    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