Ibrahim MAATKI
Ibrahim MAATKI

Reputation: 363

How to add a context menu entry in OS file explorer using Qt

I want to know if is is possible to add an entry in the context menu (right click menu) of the OS file explorer (e.g. Windows Explorer) for my program developed with Qt.

The objective is that when I right click on a file or a directory, I'd like my element to appear in that menu and do something when the user clicks on it.

Upvotes: 2

Views: 1561

Answers (1)

TheDarkKnight
TheDarkKnight

Reputation: 27621

The context menu in Windows Explorer has nothing directly to do with Qt. By simply setting a few registry entries, you can add items to the context menu that launch an application and pass parameters, such as the selected file(s) to that application.

If you google for "Adding to Windows Context Menu" you'll find articles which explain which registry entries you need to edit. Here's one such article

Once you've made the registry entries, you can export them as files that can be run on installation of your application.

Upvotes: 5

Related Questions