[Development] Calling QWindow::requestActivate after QWindow::show and before QTest::qWaitForWindowActive
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Wed Sep 3 10:17:28 CEST 2025
Il 02/09/25 11:32, Liang Qi ha scritto:
> Based on doc,https://doc.qt.io/qt-6/qwindow.html
>
> void QWindow::show() Shows the window.
> void QWindow::requestActivate() Requests the window to be activated,
> i.e. receive keyboard focus.
>
> They are different things, show() will not make the window isActive(),
> requestActivate() is needed to test keyboard input and etc afterwards.
>
> Especially for Wayland, on Xcb or X11, perhaps our implementation
> forced the window to be active when show() was called. We have tickets
> in jira.
... which likely means we won't be able to ever change that behavior as
too much code depends on it?
Thanks,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - Trusted Software Excellence
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4850 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20250903/5e3eb563/attachment-0001.bin>
More information about the Development
mailing list