[Qt-interest] open file in editor from qt

Eric Clark eclark at ara.com
Fri Jul 31 16:44:46 CEST 2009


Call the function QDesktopServices::openUrl() and pass in the URL of the file you are trying to open. This function will open the file in the default program. For example, a text file on windows will usually open in Notepad unless the user has changed that in there Windows settings.

Eric

-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Matthias Kunz
Sent: Friday, July 31, 2009 9:22 AM
To: 'qt-interest at trolltech.com'
Subject: [Qt-interest] open file in editor from qt

Hi,

I'm new to that forum and to Qt. I have a simple question.

I have a Button that should open a specific file with a certain application, i.e. if the clicks the button a file called test.txt should be open in gedit or another editor.

How does this work?

Matthias


_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list