There is a button.
When it is clicked, file C:\file.txt should be opened with default text editor (as if it is double clicked).
Is it possible in pyQt? Button is pressed -> file is opened.
All I can google is just dialogs, but I don’t need them.
file = 'C:\file.txt'
widget.connect(button, QtCore.SIGNAL('clicked()'), ????)
How it can be done?
And edit your 2nd line to:
Code for opening file copied from How to open a file with the standard application?