How do I know when a user drags a document to my app's icon?
-
I'm on a Mac. When a user wants to open a file in my app, they usually open my app and use the "Open" menu item. So I can then use
QFileDialog::getOpenFileName()
to get the file's path, and I can open the file.But sometimes they just go to the Finder and drag the file's icon on to my app's icon.
How do I get notified when that happens? And how do I know what the file is? Is there a signal somewhere I need to listen to?
-
Hi and welcome to devnet,
I think you are looking for QFileOpenEvent.
-
Hi and welcome to devnet,
I think you are looking for QFileOpenEvent.
-
T TiggerDad has marked this topic as solved on