mirror of
https://github.com/allankoechke/pywebview.git
synced 2026-12-01 17:29:16 +00:00
20 lines
432 B
Markdown
20 lines
432 B
Markdown
# Toggle full-screen
|
|
|
|
Switch application window to a full-screen mode after five seconds.
|
|
|
|
``` python
|
|
import webview
|
|
import threading
|
|
import time
|
|
|
|
def toggle_fullscreen(window):
|
|
# wait a few seconds before toggle fullscreen:
|
|
time.sleep(5)
|
|
|
|
window.toggle_fullscreen()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
window = webview.create_window('Full-screen window', 'https://pywebview.flowrl.com/hello')
|
|
webview.start(window)
|
|
``` |