- Qt 6.11
- Qt Qml
- C++ Classes
- QQmlEngine
- Qt 6.11.0 Reference Documentation

# Obsolete Members for QQmlEngine

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

## Public Functions

`(deprecated in 6.4)` bool | importPlugin(const QString &filePath, const QString &uri, QList<QQmlError> *errors)
`(deprecated)` QQmlAbstractUrlInterceptor * | urlInterceptor() const

## Member Function Documentation

### `[deprecated in 6.4]` bool QQmlEngine::importPlugin(const QString &filePath, const QString &uri, QList<QQmlError> *errors)

This function is deprecated since 6.4. We strongly advise against using it in new code.

Import the module from QML with an "import" statement instead.

Imports the plugin named filePath with the uri provided. Returns true if the plugin was successfully imported; otherwise returns false.

On failure and if non-null, the errors list will have any errors which occurred prepended to it.

The plugin has to be a Qt plugin which implements the QQmlEngineExtensionPlugin interface.

Note: Directly loading plugins like this can confuse the module import logic. In order to make the import logic load plugins from a specific place, you can use addPluginPath(). Each plugin should be part of a QML module that you can import using the "import" statement.

### `[deprecated]` QQmlAbstractUrlInterceptor *QQmlEngine::urlInterceptor() const

This function is deprecated. We strongly advise against using it in new code.

This API is private for 5.1

Returns the last QQmlAbstractUrlInterceptor. It must not be modified outside the GUI thread.