Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to open another application from Qt application with specific file
Forum Updated to NodeBB v4.3 + New Features

How to open another application from Qt application with specific file

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 4 Posters 3.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • NiagarerN Offline
    NiagarerN Offline
    Niagarer
    wrote on last edited by Niagarer
    #1

    Hi!
    I want to start another application from my qt application (like it's done with QProcess) but with a specific file or content, just like the OS does (with the corresponding program that can read the extention) when clicking on the file in a file browser/explorer/on desktop or whatever.

    How can I achieve that in Qt?
    Thanks for answers!

    K 1 Reply Last reply
    0
    • NiagarerN Niagarer

      Hi!
      I want to start another application from my qt application (like it's done with QProcess) but with a specific file or content, just like the OS does (with the corresponding program that can read the extention) when clicking on the file in a file browser/explorer/on desktop or whatever.

      How can I achieve that in Qt?
      Thanks for answers!

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @Niagarer

      You mean you have a gui showing a couple of files and you want start an application based on the extension of a file selected from your gui?

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      4
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        if yes to @koahnig questions then
        http://doc.qt.io/qt-5/qdesktopservices.html#
        and
        http://doc.qt.io/qt-5/qdesktopservices.html#openUrl

        1 Reply Last reply
        5
        • NiagarerN Offline
          NiagarerN Offline
          Niagarer
          wrote on last edited by Niagarer
          #4

          @koahnig said in How to open another application from Qt application with specific file:

          You mean you have a gui showing a couple of files and you want start an application based on the extension of a file selected from your gui?

          Well, I would rather open a file in a specific application, not nesseccairly based on the extension... (if that is possible)
          And I don't want any type of file selection, I just want the application to start the other app automatically (based on a press onto a button in my application, but without any manually file selection)

          @mrjj said in How to open another application from Qt application with specific file:

          Hi
          if yes to @koahnig questions then
          http://doc.qt.io/qt-5/qdesktopservices.html#
          and
          http://doc.qt.io/qt-5/qdesktopservices.html#openUrl

          Thank you, it works pretty well!

          But is there a way to specity, which application should be started with the file as parameter (like "open with")?

          aha_1980A 1 Reply Last reply
          0
          • NiagarerN Niagarer

            @koahnig said in How to open another application from Qt application with specific file:

            You mean you have a gui showing a couple of files and you want start an application based on the extension of a file selected from your gui?

            Well, I would rather open a file in a specific application, not nesseccairly based on the extension... (if that is possible)
            And I don't want any type of file selection, I just want the application to start the other app automatically (based on a press onto a button in my application, but without any manually file selection)

            @mrjj said in How to open another application from Qt application with specific file:

            Hi
            if yes to @koahnig questions then
            http://doc.qt.io/qt-5/qdesktopservices.html#
            and
            http://doc.qt.io/qt-5/qdesktopservices.html#openUrl

            Thank you, it works pretty well!

            But is there a way to specity, which application should be started with the file as parameter (like "open with")?

            aha_1980A Offline
            aha_1980A Offline
            aha_1980
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Niagarer

            But is there a way to specity, which application should be started with the file as parameter (like "open with")?

            No. Just use QProcess for that and give the file as parameter.

            Regards

            Qt has to stay free or it will die.

            1 Reply Last reply
            3

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved