Open with...
-
Hi,
What OS are you talking about ?
In any case, it's likely something you'll have to setup at installation time. -
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 -
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
-
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 :)