Add new comment

Sorry, I don't get it.
As I can see you are using QT and I don't know if it supports all the native Windows features - maybe this is the issue.
But using WinApi - this is doable:
-before entering fullscreen mode call GetWindowPlacement(), it will return window placement including state (normal or maximized)
-after exiting fullscreen just call SetWindowPlacement() or ShowWindow() to restore window position
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-ge...
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-se...
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sh...
Sample code:
https://devblogs.microsoft.com/oldnewthing/20100412-00/?p=14353