bbigras
bbigras

Reputation: 1430

Is there a way to list current processes using Qt on windows?

Is it possible to know which processes are running using Qt 4? I'm looking for a way to wait until an application is closed by the user to make an operation.

Upvotes: 4

Views: 2933

Answers (2)

ashcatch
ashcatch

Reputation: 2357

I don't know a Qt solution either. But doing it is not that hard using theCreateToolhelp32Snapshot(), Process32FirstW() and Process32NextW() functions. Just search the MSDN for this. There is also a (IMO too complex) example on

Taking a snapshot and viewing processes

Upvotes: 5

corné
corné

Reputation: 798

Not really a Qt4 solution, but you could start WMIC in a QProcess and evaluate the result.

Something like :

wmic process get name /every:5

Upvotes: 3

Related Questions