QInstaller Namespace

Contains classes to implement the core functionality of the Qt Installer Framework and the installer UI. More...

Header: #include <QInstaller>


namespace TaskRole



typedef Backup
typedef BackupFiles
enum DefaultFilePermissions { NonExecutable, Executable }
enum DownloadType { All, CompressedPackage, UpdatesXML }
enum JobError { InvalidUrl, Timeout, DownloadError, InvalidUpdatesXml, InvalidMetaInfo, …, RepositoryUpdatesReceived }
typedef LocalPackagesHash
typedef Operation
typedef OperationList
typedef Package
typedef PackagesList
typedef RepoHash


QStringList checkMutualOptions(CommandLineParser &parser, const QStringList &options)
QString htmlToString(const QString &html)
QString humanReadableSize(const qint64 &size, int precision = 2)
void init()
bool isVerbose()
QStringList loggingCategories()
uint qHash(const QInstaller::PackageSource &key, uint seed)
bool receivePacket(QIODevice *device, QByteArray *command, QByteArray *data)
void removeSystemGeneratedFiles(const QString &path)
QString replacePath(const QString &path, const QString &before, const QString &after)
void sendPacket(QIODevice *device, const QByteArray &command, const QByteArray &data)
bool setDefaultFilePermissions(const QString &fileName, QInstaller::DefaultFilePermissions permissions)
bool setDefaultFilePermissions(QFile *file, QInstaller::DefaultFilePermissions permissions)
void setVerbose(bool v)
bool startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid = 0)
uint verboseLevel()
QDebug operator<<(QDebug dbg, QInstaller::Component *component)
bool operator==(const QInstaller::PackageSource &lhs, const QInstaller::PackageSource &rhs)

Detailed Description


namespace QInstaller::TaskRole


class AbstractFileTask

The AbstractFileTask class is the base class of file related tasks. More...

class AspectRatioLabel

The AspectRatioLabel class provides a label for displaying a pixmap that maintains its original aspect ratio when resized. More...

class BinaryContent

The BinaryContent class handles binary information embedded into executables. More...

class BinaryFormatEngine

The BinaryFormatEngine class is the default file engine for accessing resource collections and resource files. More...

class BinaryFormatEngineHandler

The BinaryFormatEngineHandler class provides a way to register resource collections and resource files. More...

class BinaryLayout

The BinaryLayout class describes the binary content appended to a file. More...

class Component

The Component class represents the current component. More...

class ComponentModel

The ComponentModel class holds a data model for visual representation of available components to install. More...

class ComponentSelectionPage

The ComponentSelectionPage class changes the checked state of components. More...

class FileTaskItem

The FileTaskItem class represents an item in a file task object. More...

class FileTaskResult

The FileTaskResult class represents the results of a file task. More...

class FinishedPage

The FinishedPage class completes the installation wizard. More...

class IntroductionPage

The IntroductionPage class displays information about the product to install. More...

class LicenseAgreementPage

The LicenseAgreementPage presents a license agreement to the end users for acceptance. More...

class MessageBoxHandler

The MessageBoxHandler class provides a modal dialog for informing the user or asking the user a question and receiving an answer. More...

class OperationBlob

The OperationBlob class is a textual representation of an operation that can be instantiated and executed by the Qt Installer Framework. More...

class PackageManagerCore

The PackageManagerCore class provides the core functionality of the Qt Installer Framework. More...

class PackageManagerGui

The PackageManagerGui class provides the core functionality for non-interactive installations. More...

class PackageManagerPage

The PackageManagerPage class displays information about the product to install. More...

class PackageSource

The PackageSource class specifies a single package source. More...

class PerformInstallationForm

The PerformInstallationForm class shows progress information about the installation state. More...

class PerformInstallationPage

The PerformInstallationPage class shows progress information about the installation state. More...

class ReadyForInstallationPage

The ReadyForInstallationPage class informs end users that the installation can begin. More...

class Resource

The Resource class is an interface for wrapping a file as read only device. More...

class ResourceCollection

The ResourceCollection class is an abstraction that groups together a number of resources. More...

class ResourceCollectionManager

The ResourceCollectionManager class is an abstraction that groups together a number of resource collections. More...

class RestartPage

The RestartPage class enables restarting the installer. More...

class ScriptEngine

The ScriptEngine class is used to prepare and run the component scripts. More...

class StartMenuDirectoryPage

The StartMenuDirectoryPage class specifies the program group for the product in the Windows Start menu. More...

class SystemInfo

Provides information about the operating system. More...

class TargetDirectoryPage

The TargetDirectoryPage class specifies the target directory for the installation. More...

Type Documentation

typedef QInstaller::Backup

Synonym for QPair<QString, QString>. Contains a pair of an original and a generated backup filename for a file.

typedef QInstaller::BackupFiles

Synonym for QVector<Backup>.

enum QInstaller::DefaultFilePermissions

QInstaller::NonExecutable0x6644Default permissions for a non-executable file.
QInstaller::Executable0x7755Default permissions for an executable file.

enum QInstaller::DownloadType


enum QInstaller::JobError


typedef QInstaller::LocalPackagesHash

Synonym for QHash<QString, KDUpdater::LocalPackage>.

typedef QInstaller::Operation

Synonym for KDUpdater::UpdateOperation.

typedef QInstaller::OperationList

Synonym for QList<QInstaller::Operation*>.

typedef QInstaller::Package

Synonym for KDUpdater::Update.

typedef QInstaller::PackagesList

Synonym for QList<QInstaller::Package*>.

typedef QInstaller::RepoHash

Synonym for QHash<QString, QPair<Repository, Repository> >. Describes a repository update with the supported key strings being replace, remove, and add.

Function Documentation

QStringList QInstaller::checkMutualOptions(CommandLineParser &parser, const QStringList &options)

Returns a list of mutually exclusive options passed to the parser, if there is at least one mutually exclusive pair of options set. Otherwise returns an empty QStringList. The options considered mutual are provided with options.

QString QInstaller::htmlToString(const QString &html)

Converts and returns a string html containing an HTML document as a plain text.

QString QInstaller::humanReadableSize(const qint64 &size, int precision = 2)

Returns the given size in a measuring unit suffixed human readable format, with precision marking the number of shown decimals.

void QInstaller::init()

Initializes the 7z library and installer resources. Registers custom operations and installs a custom message handler.

bool QInstaller::isVerbose()

Returns true if the installer is set to verbose output.

QStringList QInstaller::loggingCategories()

Returns available logging categories.

uint QInstaller::qHash(const QInstaller::PackageSource &key, uint seed)

Returns the hash value for the key, using seed to seed the calculation.

bool QInstaller::receivePacket(QIODevice *device, QByteArray *command, QByteArray *data)

Reads a packet from device, and stores its content into command and data.

Returns false if the packet in the device buffer is yet incomplete, true otherwise.

Note: Both client and server need to have the same endianness.

void QInstaller::removeSystemGeneratedFiles(const QString &path)

Removes system generated files from path on Windows and macOS. Does nothing on Linux.

QString QInstaller::replacePath(const QString &path, const QString &before, const QString &after)

Replaces the path before with the path after at the beginning of path and returns the replaced path. If before cannot be found in path, the original value is returned.

void QInstaller::sendPacket(QIODevice *device, const QByteArray &command, const QByteArray &data)

Write a packet containing command and data to device.

Note: Both client and server need to have the same endianness.

bool QInstaller::setDefaultFilePermissions(const QString &fileName, QInstaller::DefaultFilePermissions permissions)

Sets permissions of file or directory specified by fileName to 644 or 755 based by the value of permissions.

Returns true on success, false otherwise.

bool QInstaller::setDefaultFilePermissions(QFile *file, QInstaller::DefaultFilePermissions permissions)

Sets permissions of file or directory specified by file to 644 or 755 based by the value of permissions. This is effective only on Unix platforms as setPermissions() does not manipulate ACLs. On Windows NTFS volumes this only unsets the legacy read-only flag regardless of the value of permissions.

Returns true on success, false otherwise.

void QInstaller::setVerbose(bool v)

Sets to verbose output if v is set to true. Calling this multiple times increases or decreases the verbosity level accordingly.

See also isVerbose().

bool QInstaller::startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid = 0)

Starts the program program with the arguments arguments in a new process, and detaches from it. Returns true on success; otherwise returns false. If the calling process exits, the detached process will continue to live.

Note that arguments that contain spaces are not passed to the process as separate arguments.

Unix: The started process will run in its own session and act like a daemon. Windows: Arguments that contain spaces are wrapped in quotes. The started process will run as a regular standalone process.

The process will be started in the directory workingDirectory.

If the function is successful then pid is set to the process identifier of the started process.

Additional note: The difference in using this function over its equivalent from QProcess appears on Windows. While this function will truly detach and not show a GUI window for the started process, the QProcess version will.

uint QInstaller::verboseLevel()

Returns the current verbosity level.

QDebug QInstaller::operator<<(QDebug dbg, QInstaller::Component *component)

Returns the debugging output stream, dbg, for the component component.

bool QInstaller::operator==(const QInstaller::PackageSource &lhs, const QInstaller::PackageSource &rhs)

Returns true if lhs and rhs are equal; otherwise returns false.

© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.