mirror of
https://github.com/allankoechke/pywebview.git
synced 2026-11-30 10:58:50 +00:00
22 lines
437 B
Python
22 lines
437 B
Python
import webview
|
|
import threading
|
|
import time
|
|
|
|
"""
|
|
This example demonstrates how to toggle fullscreen mode programmatically.
|
|
"""
|
|
|
|
|
|
def toggle_fullscreen():
|
|
# wait a few seconds before toggle fullscreen:
|
|
time.sleep(5)
|
|
|
|
webview.toggle_fullscreen()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
t = threading.Thread(target=toggle_fullscreen)
|
|
t.start()
|
|
|
|
webview.create_window("Full-screen window", "https://pywebview.flowrl.com/hello")
|