Jake Petroules
Jake Petroules

Reputation: 24160

Opening files from Finder with a Qt-based application?

Apparently, for Cocoa applications, you're supposed to implement [[NSApp delegate] application:openFile:] or something like that to allow your application to open files double clicked in Finder.

How do you achieve this functionality using Qt, as the name of the file to be opened is not passed on the command line?

Upvotes: 2

Views: 840

Answers (1)

Frank Osterfeld
Frank Osterfeld

Reputation: 25165

QFileOpenEvent (Qt4/Qt5) should do the trick.

Also see https://doc.qt.io/archives/qq/qq18-macfeatures.html

Upvotes: 2

Related Questions