aboutsummaryrefslogtreecommitdiffstats
path: root/examples/webchannel/standalone/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/webchannel/standalone/main.py')
-rw-r--r--examples/webchannel/standalone/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/webchannel/standalone/main.py b/examples/webchannel/standalone/main.py
index f61954fc5..68f199336 100644
--- a/examples/webchannel/standalone/main.py
+++ b/examples/webchannel/standalone/main.py
@@ -61,7 +61,7 @@ if __name__ == '__main__':
print('The example requires SSL support.')
sys.exit(-1)
cur_dir = os.path.dirname(os.path.abspath(__file__))
- jsFileInfo = QFileInfo(cur_dir + "/qwebchannel.js")
+ jsFileInfo = QFileInfo(f"{cur_dir}/qwebchannel.js")
if not jsFileInfo.exists():
QFile.copy(":/qtwebchannel/qwebchannel.js",
jsFileInfo.absoluteFilePath())
@@ -88,7 +88,7 @@ if __name__ == '__main__':
channel.registerObject("core", core)
# open a browser window with the client HTML page
- url = QUrl.fromLocalFile(cur_dir + "/index.html")
+ url = QUrl.fromLocalFile(f"{cur_dir}/index.html")
QDesktopServices.openUrl(url)
message = f"Initialization complete, opening browser at {url.toDisplayString()}."