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. CreateWindowContainer steals focus from application
Qt 6.11 is out! See what's new in the release blog

CreateWindowContainer steals focus from application

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 815 Views 1 Watching
  • 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.
  • C Offline
    C Offline
    chrismit7
    wrote on last edited by
    #1

    I'm trying to use the new QtQuick items, and when I embed a QML item inside a widget, I am unable to click on anything within the parent widget.

    QWidget *container = QWidget::createWindowContainer( qView, mpMainDisplay );
    container->setGeometry(x, y, width, height);
    container->show();
    qView->show()

    mpMainDisplay is the primary widget for the application (a QWidget) and qView is a QQuickView.

    Is there anyway to stop the new QML instance from taking all focus? I've tried using the NoFocus policy without any luck. I've also tried setFocus and activeWindow on mpMainDisplay without any luck.

    1 Reply Last reply
    1

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved