Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.15.0
-
None
-
deepin v20
-
-
acb0065cc7e4ee849cc87ce72e46b05a61370c43 (qt/qtbase/dev)
Description
Description: In some cases, the application cannot be ejected after being minimized
Environment: deepin v20,Window manager: KWIN
Steps: Kill the window manager, start the example program, open the window manager, and click minimize.
Reason: The application may be started before the window manager, and some window managers _NET_SUPPORTED may be changed. These conditions will cause the _NET_SUPPORTED obtained by Qt to be inconsistent with the window manager
#include "widget.h" #include <QDebug> #include <QPlainTextEdit> #include <QLineEdit> #include <QPushButton> #include <QVBoxLayout> #include <QLabel> #include <QTimer> #include <QSpinBox> Widget::Widget(QWidget *parent) : QDialog(parent) { QTimer* timer = new QTimer; timer->setInterval(2000); timer->start(); connect(timer,&QTimer::timeout,[=](){ this->show(); this->activateWindow(); }); this->resize(800,600); } Widget::~Widget() { } void Widget::on_pushButton_clicked() { }