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. Additional details of Files?
Forum Updated to NodeBB v4.3 + New Features

Additional details of Files?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.8k Views 1 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.
  • C Offline
    C Offline
    CAD_coding
    wrote on 25 Jun 2013, 09:49 last edited by
    #1

    Hi,
    I have a file format for my application.
    I want to associate it to my application such that any file with that extension is double clicked it should open my application & pass the path of file to the exe as a command line argument.
    How do I do that?
    Is it possible to achieve this independent of OS?
    If yes then how will the OS know the path of exe that must be run for that extension?

    PS: Example when we double click a pdf file, it results in launching Adobe Reader & opening that pdf. How do I achieve similar functionality for my application?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 25 Jun 2013, 09:55 last edited by
      #2

      this is very OS specific. For windows see this "KB article":http://support.microsoft.com/kb/307859.

      If you want to register it on setup time (windows) you will need to alter the windows registry: see "this":http://social.msdn.microsoft.com/Forums/vstudio/en-US/630ed1d9-73f1-4cc0-bc84-04f29cffc13b/what-registry-keys-are-responsible-for-file-extension-association.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • C Offline
        C Offline
        CAD_coding
        wrote on 25 Jun 2013, 13:18 last edited by
        #3

        The links you gave me are for manually creating the associativity.
        I want to create the associativity by code.

        Doesnt Qt have its way of doing this?

        And what about other OS?

        What do people normally do for achieving this associativity?

        1 Reply Last reply
        0
        • R Offline
          R Offline
          raven-worx
          Moderators
          wrote on 25 Jun 2013, 13:29 last edited by
          #4

          [quote author="CAD_coding" date="1372166293"]
          The links you gave me are for manually creating the associativity.
          I want to create the associativity by code.
          [/quote]
          The first one is, but not the second one! You can alter the windows registry by code. e.g. this is possible with QSettings.

          [quote author="CAD_coding" date="1372166293"]
          Doesnt Qt have its way of doing this?
          [/quote]
          No... i doubt that.

          [quote author="CAD_coding" date="1372166293"]
          And what about other OS?
          [/quote]
          i don't know...don't know how the exact mechanismn is on linux or mac platforms. Maybe someone else can help you out here?
          But for sure there is a similar solution like for windows.

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • C Offline
            C Offline
            CAD_coding
            wrote on 26 Jun 2013, 14:51 last edited by
            #5

            Hi raven,

            Thanks for your help!
            Looks like I am on my own now...

            1 Reply Last reply
            0

            3/5

            25 Jun 2013, 13:18

            • Login

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