Bladeren bron

change title of native window (fixes #3583)

Falko Schindler 9 maanden geleden
bovenliggende
commit
bf4a0fd325
1 gewijzigde bestanden met toevoegingen van 3 en 1 verwijderingen
  1. 3 1
      nicegui/functions/page_title.py

+ 3 - 1
nicegui/functions/page_title.py

@@ -1,4 +1,4 @@
-from .. import json
+from .. import core, json
 from ..context import context
 
 
@@ -11,5 +11,7 @@ def page_title(title: str) -> None:
     """
     client = context.client
     client.title = title
+    if core.app.native.main_window:
+        core.app.native.main_window.set_title(title)
     if client.has_socket_connection:
         client.run_javascript(f'document.title = {json.dumps(title)}')