How does pyqt5 open files by default?

for example, after double-clicking the HTML file in the gui interface, open the file with the default browser
pyqt5. Is there such a function or method?

Oct.17,2021

I don't know if python provides a built-in solution, you can check it out.

I think we can directly call the open file program built into the operating system and let the operating system decide how to open it. For example, the program of windows is explorer.exe , the program of Linux is xdg-open , and the program of Mac OS is open

.

for example, if you judge that it is the current windows operating system, use:

os.system('explorer.exe "path\\to\\file"')
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a72d-41256.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a72d-41256.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?