- Qt 5.15
- Qt Core
- C++ Classes
- QResource
- Qt 5.15.15 Reference Documentation

# Obsolete Members for QResource

The following members of class QResource are obsolete. They are provided to keep old source code working. We strongly advise against using them in new code.

## Public Functions

`(obsolete)` bool | isCompressed() const

## Static Public Members

`(obsolete)` void | addSearchPath(const QString &path)
`(obsolete)` QStringList | searchPaths()

## Member Function Documentation

### `[static]` void QResource::addSearchPath(const QString &path)

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use QDir::addSearchPath() with a prefix instead.

Adds path to the search paths searched in to find resources that are not specified with an absolute path. The path must be an absolute path (start with `/`).

The default search path is to search only in the root (`:/`). The last path added will be consulted first upon next QResource creation.

### bool QResource::isCompressed() const

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Returns `true` if the resource represents a file and the data backing it is in a compressed format, false otherwise. If the data is compressed, check compressionAlgorithm() to verify what algorithm to use to decompress the data.

Note: This function is deprecated and can be replaced with

     compressionAlgorithm() != NoCompression

See also data(), compressionAlgorithm(), and isFile().

### `[static]` QStringList QResource::searchPaths()

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Use QDir::searchPaths() instead.

Returns the current search path list. This list is consulted when creating a relative resource.

See also QDir::addSearchPath() and QDir::setSearchPaths().