LINUX.ORG.RU

История изменений

Исправление Dr64h, (текущая версия) :

Положение окон Вялый так и не запоминает. После перезагрузки приходится их таскать снова где им место.

Сам пока свой софт пишу постоянно сталкиваюсь с подобной чепухой, потом сидишь и думаешь, то ли это в моём софте бага, то ли это такая «фишка» окружения.

https://doc.qt.io/qt-6/application-windows.html#window-geometry

X11 Peculiarities

On X11, a window does not have a frame until the window manager decorates it. This happens asynchronously at some point in time after calling QWidget::show() and the first paint event the window receives, or it does not happen at all. Bear in mind that X11 is policy-free (others call it flexible). Thus you cannot make any safe assumption about the decoration frame your window will get. Basic rule: There's always one user who uses a window manager that breaks your assumption, and who will complain to you.

...

Wayland Peculiarities

On Wayland, programmatically setting or getting the position of a top-level window from the client-side is typically not supported. Technically speaking, it depends on the shell interface. For typical desktop compositors, however, the default shell interface will be XDG Shell, which does not support manual positioning of windows. In such cases, Qt will ignore calls to set the top-level position of a window, and, when queried, the window position will always be returned as QPoint(0, 0).

Исходная версия Dr64h, :

Положение окон Вялый так и не запоминает. После перезагрузки приходится их таскать снова где им место.

Сам пока свой софт пишу постоянно сталкиваюсь с подобной чепухой, потом сидишь и думаешь, то ли это в моём софте бага, то ли это такая «фишка» окружения.

https://doc.qt.io/qt-6/application-windows.html#window-geometry

X11 Peculiarities

On X11, a window does not have a frame until the window manager decorates it. This happens asynchronously at some point in time after calling QWidget::show() and the first paint event the window receives, or it does not happen at all. Bear in mind that X11 is policy-free (others call it flexible). Thus you cannot make any safe assumption about the decoration frame your window will get. Basic rule: There's always one user who uses a window manager that breaks your assumption, and who will complain to you.

Wayland Peculiarities

On Wayland, programmatically setting or getting the position of a top-level window from the client-side is typically not supported. Technically speaking, it depends on the shell interface. For typical desktop compositors, however, the default shell interface will be XDG Shell, which does not support manual positioning of windows. In such cases, Qt will ignore calls to set the top-level position of a window, and, when queried, the window position will always be returned as QPoint(0, 0).