I have pinned my Qt application to the taskbar

However, I would like to open the application using external files, example lets say there is a jpeg file. I would like to be able to drag it onto the taskbar where the Qt app Icon is present and open the contents of the file in my App.

How can that be accomplished?
Any Qt classes specific to this purpose or should I use command line arguments?