Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Call showNormal to restore the minimized state of QDeclarativeView causing the QML items losing focus
Qt 6.12 LTS is out! See what's new in the release blog

Call showNormal to restore the minimized state of QDeclarativeView causing the QML items losing focus

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 3.2k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I created a qml file with several buttons and edit , then use QDeclarativeView subclass to load the qml file, I provide the minimized option ,
    and calling showMinimized() to make it minimized , while I call showNormal to restore it again , all the buttons and edits lost focus , I don't know why , the view subclass's constructor is here

    @
    setResizeMode(QDeclarativeView::SizeRootObjectToView);
    setWindowFlags(Qt::FramelessWindowHint);
    setAttribute(Qt::WA_TranslucentBackground);
    QPalette palette;
    palette.setColor(QPalette::Base,Qt::transparent);
    setPalette(palette);
    fAbsolutePath = QDir::currentPath();
    fDeclarativeContext = rootContext();
    fDeclarativeContext->setContextProperty("mainWidget",this);
    setSource(QUrl("qrc:/qml/NDuoDemo.qml"));
    @

    why ? someone could tell me why ?

    [EDIT: code formatting, please wrap in @-tags, Volker]

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Looks like related to "QML: rendering problems after minimizing frameless window":http://developer.qt.nokia.com/forums/viewthread/7081/#42322

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        thanks , Vijay , I think it is the same , I will try that , thanks very much

        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
        • Unsolved