QDialog in Wayland works incomplete

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QDialog in Wayland works incomplete

966 Views
lishaocheng
Contributor III

Hi, community
I deploy Qt application to embedded Linux, imx8m plus, based on Yocto Linux 5.10.52 and Wayland desktop.

Here is an example code to show the Qdialog.

 

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    d = new QDialog(this, Qt::FramlessWindowHint | Qt::WindowStaysOnTopHint);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{
    d->exec();
}

 

The QDialog works perfectly on x86 host PC, but my embedded Linux works incomplete.

The QDialog default position should locate at centered on top of the parent's top-level widget.
But QDialog in Wayland shows on a random position. 

How to fix it ?

0 Kudos
5 Replies

647 Views
r_trivedi123
Contributor IV

@lishaocheng  Hope our created plugin can help for your needs,

sisigwaylandsink - A custom gstreamer plugin to control geometry 
Features and demo is provided in the video link.

--
BR
rutvij.trivedi@siliconsignals.io

0 Kudos

896 Views
lishaocheng
Contributor III

I remove weston,use  qt with eglfs ,works fine。

0 Kudos

946 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Please try latest BSP[L5.15.52] and this issue is about QT source code. 

You can find similar issue in https://bugreports.qt.io/browse/QTBUG-101555

0 Kudos

927 Views
lishaocheng
Contributor III

I have done some testing and it feels like a problem with weston , I’m evaluating two solutions:
1. Replace weston with Qtwayland compositor
2. Don't use wayland at all, but use the eglfs platform plugin.

I want to know:
Are these two solutions feasible, and what impact might they have on Qt apps?
If I don't use weston or wayland, is there any impact on the GPU features provided by iMX8MP for Qt apps? Is there any relevant information to refer to?

0 Kudos

923 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

You can replace wetson with Qtwayland, the only impact is that you can't use g2d rendering.

0 Kudos