Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
窓を閉める方法を探しています。が見つかりましwindow.set_resizable(False)たが、ウィンドウのサイズが要求されたサイズに変更されてからロックされます。ウィンドウのサイズを変更してから、サイズを変更したサイズにロックできるようにしたいと考えています。
window.set_resizable(False)
set_size_request()を呼び出す前に、現在のウィンドウ サイズ (からwindow_get_size()) を使用できますset_resizable()か?
set_size_request()
window_get_size()
set_resizable()
これを使用できます:
window.set_geometry_hints(window, min_width, min_height, max_width, max_height)