Pages
API Documentation
On this page

KProcessList::KProcessInfo Class

Contains information about a process. More...

  • Header: #include <KProcessInfo>
  • CMake: find_package(KF6 REQUIRED COMPONENTS CoreAddons)
    target_link_libraries(mytarget PRIVATE KF6::CoreAddons)

List of all members, including inherited members

Public Functions

Detailed Description

This class is usually not used alone but rather returned by processInfoList and processInfo. To check if the data contained in this class is valid use the isValid method.

Member Function Documentation

KProcessInfo::KProcessInfo()

KProcessInfo::KProcessInfo(qint64 pid, const QString &command, const QString &user)

KProcessInfo::KProcessInfo(qint64 pid, const QString &command, const QString &name, const QString &user)

QString KProcessInfo::command() const

The command line running this process e.g /bin/ls /some/path -R

bool KProcessInfo::isValid() const

If the KProcessInfo contains valid information. If it returns true the pid, name and user function returns valid information, otherwise they return value is undefined.

QString KProcessInfo::name() const

The name of the process.

The class will try to get the full path to the executable file for the process but if it is not available the name of the process will be used instead. e.g /bin/ls

qint64 KProcessInfo::pid() const

The pid of the process

QString KProcessInfo::user() const

The username the process is running under.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.