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?
QtWS25 Last Chance

Additional details of Files?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.8k 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.
  • CAD_codingC Offline
    CAD_codingC Offline
    CAD_coding
    wrote on 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
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on 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
      • CAD_codingC Offline
        CAD_codingC Offline
        CAD_coding
        wrote on 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
        • raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on 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
          • CAD_codingC Offline
            CAD_codingC Offline
            CAD_coding
            wrote on last edited by
            #5

            Hi raven,

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

            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