Test Enviroment: i.MX6Q/QP, fsl yocto L3.14.52/L4.1.15
I found a pop-up dialog refresh problem in L3.14.52 & L4.1.15. When a dialog based window pop up a new dialog(e.g QMessageBox), the new dialog will not update ui when moving the new dialog. If I changed the main window's base class to QWidget, it seams normal.
The following is the main windows's source code:
#ifndef DIALOG_H
#define DIALOG_H
#include <QDialog>
#include <QPushButton>
class Dialog : public QDialog // If change QDialog to QWidget, it seams normal
{
Q_OBJECT
public:
Dialog(QWidget *parent = 0);
~Dialog();
private slots:
void btnTest_clicked();
private:
QPushButton *btnTest;
};
#endif // DIALOG_H
#include "dialog.h"
#include <QMessageBox>
#include <QVBoxLayout>
Dialog::Dialog(QWidget *parent)
: QDialog(parent) // Here should be changed to QWidget if the above changed.
{
btnTest = new QPushButton(this);
btnTest->setText("Test");
connect(btnTest, &QPushButton::clicked, this, &Dialog::btnTest_clicked);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(btnTest);
setLayout(mainLayout);
setWindowTitle("Popup dialog test");
}
Dialog::~Dialog()
{
}
void Dialog::btnTest_clicked()
{
QMessageBox::information(this, "BUG TEST", "Good luck!");
}
Can anybody help me?
Original Attachment has been moved to: dialogbug.rar
Hi Hardy
one can post this to Qt issues WiKi
Qt 5.5.0 Known Issues - Qt Wiki
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
It seams not the qt's bug, because this version on PC runs normally. I don't know whether the GPU's driver matches QT's render library or not.