You are not logged in.

1

Thursday, September 10th 2015, 5:02pm

Window position in embedded environment with QWS

Hi,

Here is my problem :

I have a PC with linux on which I develop an application with Qt. I can build my app for desktop (linux PC) or for embedded linux.
The default case when I create a window for desktop, is a windows in the center of the screen. With the same code, on the embedded linux, my window is stack on the top-left corner of the screen.

When I try to move the window with a QWidget->move(x,y), I am able to display the window where I want on the screen on the desktop PC, but on the embedded linux my window stays always stack in the top-left corner...

The embedded app is run with a "-qws" option and I think the probleme is around QWS, maybe something like a configuration of QWS, I don't know.

A friend as a similar problem with a touchscreen which is works correctly on the embedded linux but became not calibrate when QWS is launched.

An idea to solve my problem ?

Thanks !!

2

Friday, September 11th 2015, 9:48am

I found the solution :

I think QWS set the position of all the windows in (0,0).
Everytime you hide() a window, and then show() a window, QWS reset the position and display it in (0,0).

To correct this, I replace this :

this.show();

by :

showInCenter()
{
this.move(x,y);
this.show();
}

Thanks !