AnsweredAssumed Answered

QT5.5 dialog based app problem in L3.14.52/L4.1.15

Question asked by Hardy Lee on Apr 19, 2016

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

Outcomes