Call showNormal to restore the minimized state of QDeclarativeView causing the QML items losing focus
-
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]
-
Looks like related to "QML: rendering problems after minimizing frameless window":http://developer.qt.nokia.com/forums/viewthread/7081/#42322