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. Call showNormal to restore the minimized state of QDeclarativeView causing the QML items losing focus
Forum Updated to NodeBB v4.3 + New Features

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 2.9k 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.
  • B Offline
    B Offline
    brucewuu
    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]

    wish all the best to you from
    bruce wuu
    Autodesk China Inc.
    SW Developer
    M&E Product Developerment Group
    Work 137 6411 8921
    bruce.wu@autodesk.com

    1 Reply Last reply
    0
    • T Offline
      T Offline
      thisisbhaskar
      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
      • B Offline
        B Offline
        brucewuu
        wrote on last edited by
        #3

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

        wish all the best to you from
        bruce wuu
        Autodesk China Inc.
        SW Developer
        M&E Product Developerment Group
        Work 137 6411 8921
        bruce.wu@autodesk.com

        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