Hello, I have a small fullscreen program which doesn't minimize properly. I can get the program to minimize in Qt 5.0.2 but not in 5.1.0. Everything is fine in Qt Creator, yet when I deploy 5.0.2 works, but 5.1.0 doesn’t.
I have noticed that 5.0.2 requires d3dcompiler_43.dll but 5.1.0 doesn’t, and the 5.1.0\mingw48_32\bin folder doesn’t contain that file at all, and it’s also missing libEGL.dll and GLESv2.dll which were present in 5.0.2. I found them in the Tools\QtCreator\bin folder.
I have a small program which shows what happens, but you will have to deploy it first:
import QtQuick 2.0
Rectangle {
width: 360
height: 360
Text {
id: minText
text: qsTr("Minimize")
anchors.centerIn: parent
MouseArea {
anchors.fill: parent
onClicked: {
QtQuick2ApplicationViewer.showMinimized();
}
}
}
Text {
id: quitText
text: qsTr("Quit")
anchors.left: minText.right
anchors.leftMargin: 10
anchors.verticalCenter: minText.verticalCenter
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
}
}
}
}
import QtQuick 2.0
Rectangle {
width: 360
height: 360
Text {
id: minText
text: qsTr("Minimize")
anchors.centerIn: parent
MouseArea {
anchors.fill: parent
onClicked: {
QtQuick2ApplicationViewer.showMinimized();
}
}
}
Text {
id: quitText
text: qsTr("Quit")
anchors.left: minText.right
anchors.leftMargin: 10
anchors.verticalCenter: minText.verticalCenter
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
}
}
}
}
To copy to clipboard, switch view to plain text mode
Here’s the main.cpp file:
#include <QtGui/QGuiApplication>
#include "qtquick2applicationviewer.h"
#include <QQmlContext>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QtQuick2ApplicationViewer viewer;
viewer.rootContext()->setContextProperty("QtQuick2ApplicationViewer", &viewer);
viewer.setMainQmlFile(QStringLiteral("qml/MinimizeTest/main.qml"));
viewer.showFullScreen();
return app.exec();
}
#include <QtGui/QGuiApplication>
#include "qtquick2applicationviewer.h"
#include <QQmlContext>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QtQuick2ApplicationViewer viewer;
viewer.rootContext()->setContextProperty("QtQuick2ApplicationViewer", &viewer);
viewer.setMainQmlFile(QStringLiteral("qml/MinimizeTest/main.qml"));
viewer.showFullScreen();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
This only happens if the program is set to showFullScreen(), but doesn’t happen if showExpanded() is used.
Bookmarks