Answer the question
In order to leave comments, you need to log in
How to use Cocoa in a Qt5 project?
Hello!
I'm writing an application for OS X using Qt5 which keeps track of application launches.
How to get a list of running applications figured out:
#import <Cocoa/Cocoa.h>
QList<CProcInfo> procList;
CProcInfo procInfo;
for(NSRunningApplication *app in NSWorkspace.sharedWorkspace.runningApplications)
{
procInfo.pid = (quint32)app.processIdentifier;
procInfo.name = QString::fromNSString(app.localizedName);
procInfo.path = QString::fromNSString(app.executableURL.path);
procList << procInfo;
}
NSRunningApplication *app
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question