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

Open with...

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 4 Posters 770 Views 3 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.
  • G Offline
    G Offline
    GRUB_666
    wrote on last edited by
    #1

    Hi! I have a program that works with files. How can I open files on my computer with my program using windows-context menu?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by aha_1980
      #2

      Hi,

      What OS are you talking about ?
      In any case, it's likely something you'll have to setup at installation time.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      G 1 Reply Last reply
      2
      • SGaistS SGaist

        Hi,

        What OS are you talking about ?
        In any case, it's likely something you'll have to setup at installation time.

        G Offline
        G Offline
        GRUB_666
        wrote on last edited by
        #3

        @SGaist
        I want do it on Windows.
        Please, tell more about installation

        Pl45m4P 1 Reply Last reply
        0
        • G GRUB_666

          @SGaist
          I want do it on Windows.
          Please, tell more about installation

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by Pl45m4
          #4

          @GRUB_666

          Do you want to use the context menu inside your program window or everywhere?

          Inside your app, you can use QContextMenuEvents from a QMenu.
          To use it anywhere else, you have to register the action on your OS (set Windows Registry Keys)

          EDIT:
          This shows how to do it manually. You have to create the REG_KEYs with your app, and then define actions what will happen, if you open file "test.abc" with your app


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          2
          • A Offline
            A Offline
            arsinte_andrei
            wrote on last edited by
            #5

            or what you can do is to make right click on the file that you want to open with your program and then to properties and then change the default open with and set there your program then click on Apply and Ok - depending on windows version that you use you can also edit the extension and put a path to your program there to handle that extension

            Pl45m4P 1 Reply Last reply
            0
            • A arsinte_andrei

              or what you can do is to make right click on the file that you want to open with your program and then to properties and then change the default open with and set there your program then click on Apply and Ok - depending on windows version that you use you can also edit the extension and put a path to your program there to handle that extension

              Pl45m4P Offline
              Pl45m4P Offline
              Pl45m4
              wrote on last edited by Pl45m4
              #6

              @arsinte_andrei

              Depending on the file extension, it may work (if you have custom extensions), but if you have "basic extensions" like .txt, jpg it's better to not set your app as default program for all files with this type. Unless you created e.g. a new image viewer (to show / edit png files) to replace the windows app and you only want to use your app to open this :)


              If debugging is the process of removing software bugs, then programming must be the process of putting them in.

              ~E. W. Dijkstra

              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