[SOLVED]open TXT files in a text editor different from the default text editor



  • Hello,

    I'm searching from open TXT files in different text editors which are different from the default text editor,
    I'm using QDesktopServices to open text files, but it seems it opens them always in the default text editor, and there's no way to specify a preferred text editor,

    any suggestions ?
    Thanks


  • Moderators

    You can use QProcess to run any app with any list of parameters. Just point it to your preferred editor and pass the name of the file as a parameter.



  • [quote author="Chris Kawa" date="1406157628"]You can use QProcess to run any app with any list of parameters. Just point it to your preferred editor and pass the name of the file as a parameter.[/quote]

    Thank you, It's exactly what I was looking for,


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.