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. Open file with my app
Forum Updated to NodeBB v4.3 + New Features

Open file with my app

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 597 Views
  • 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.
  • UnitScanU Offline
    UnitScanU Offline
    UnitScan
    wrote on last edited by
    #1

    Where can I find an idea to create the code needed to open a certain type of file (eg audio file) with the desktop app I created with Qt?

    jsulmJ 1 Reply Last reply
    0
    • UnitScanU UnitScan

      Where can I find an idea to create the code needed to open a certain type of file (eg audio file) with the desktop app I created with Qt?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @UnitScan Can you be more precise? What do you want to do with the file? Do you want to play media files? Do you want read/write files?
      For reading/writing files read documentation: https://doc.qt.io/qt-5/qfile.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      JonBJ 1 Reply Last reply
      0
      • jsulmJ jsulm

        @UnitScan Can you be more precise? What do you want to do with the file? Do you want to play media files? Do you want read/write files?
        For reading/writing files read documentation: https://doc.qt.io/qt-5/qfile.html

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #3

        @jsulm
        Purely at a guess, I suspect the OP would like to know how to connect/associate a file type to open with his Qt application? On whatever platform he might be on....

        UnitScanU 1 Reply Last reply
        1
        • JonBJ JonB

          @jsulm
          Purely at a guess, I suspect the OP would like to know how to connect/associate a file type to open with his Qt application? On whatever platform he might be on....

          UnitScanU Offline
          UnitScanU Offline
          UnitScan
          wrote on last edited by UnitScan
          #4

          @JonB said in Open file with my app:

          @jsulm
          Purely at a guess, I suspect the OP would like to know how to connect a file type to open with his Qt application?

          Yes, this! I'm on Windows

          jsulmJ JonBJ 2 Replies Last reply
          0
          • UnitScanU UnitScan

            @JonB said in Open file with my app:

            @jsulm
            Purely at a guess, I suspect the OP would like to know how to connect a file type to open with his Qt application?

            Yes, this! I'm on Windows

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @UnitScan This is OS specific. For windows see https://wiki.qt.io/Assigning_a_file_type_to_an_Application_on_Windows

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            2
            • UnitScanU UnitScan

              @JonB said in Open file with my app:

              @jsulm
              Purely at a guess, I suspect the OP would like to know how to connect a file type to open with his Qt application?

              Yes, this! I'm on Windows

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #6

              @UnitScan
              Unless there is a better method, https://wiki.qt.io/Assigning_a_file_type_to_an_Application_on_Windows seem to go through this for you by altering the registry under Windows.

              P.S.
              Furthermore, if you are distributing your application and use the the Qt Installer, you might look to look at https://stackoverflow.com/questions/32316361/how-can-i-make-file-association-in-qt-installer1-5-0.

              1 Reply Last reply
              4
              • UnitScanU Offline
                UnitScanU Offline
                UnitScan
                wrote on last edited by
                #7

                Yes, I had already read this article, but in my case how should I adapt the code? The files I should open with my app are audio files (.mp3, .ogg, .m4a etc.)

                1 Reply Last reply
                0

                • Login

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