QDialog in Wayland works incomplete

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

QDialog in Wayland works incomplete

1,477 次查看
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 项奖励
回复
5 回复数

1,158 次查看
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 项奖励
回复

1,407 次查看
lishaocheng
Contributor III

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

0 项奖励
回复

1,457 次查看
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 项奖励
回复

1,438 次查看
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 项奖励
回复

1,434 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复