Skip to content

Commit

Permalink
convert to int to fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen committed Feb 7, 2023
1 parent cc9958f commit c2c49ce
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions qcodes/utils/qt_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,19 @@ def foreground_qt_window(window: "QMainWindow") -> None:
# use the idea from
# https://stackoverflow.com/questions/12118939/how-to-make-a-pyqt4-window-jump-to-the-front
SetWindowPos(
window.winId(), # pyright: ignore[reportGeneralTypeIssues]
win32con.HWND_TOPMOST, # = always on top. only reliable way to bring it to the front on windows
int(window.winId()),
win32con.HWND_TOPMOST,
# = always on top. only reliable way to bring it to the front on windows
0,
0,
0,
0,
win32con.SWP_NOMOVE | win32con.SWP_NOSIZE | win32con.SWP_SHOWWINDOW,
)
SetWindowPos(
window.winId(), # pyright: ignore[reportGeneralTypeIssues]
win32con.HWND_NOTOPMOST, # disable the always on top, but leave window at its top position
int(window.winId()),
win32con.HWND_NOTOPMOST,
# disable the always on top, but leave window at its top position
0,
0,
0,
Expand Down

0 comments on commit c2c49ce

Please sign in to comment.