Obsolete Members for QSqlDriver

以下成員源於類 QSqlDriver 已過時。 提供它們是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它們。

信號

(obsolete) void notification (const QString & name )

成員函數文檔編製

[signal] void QSqlDriver:: notification (const QString & name )

此函數已過時。提供它是為使舊源代碼能繼續工作。強烈建議不要在新代碼中使用它。

This signal is emitted when the database posts an event notification that the driver subscribes to. name identifies the event notification.

use QSqlDriver::notification(const QString &name, QSqlDriver::NotificationSource source, const QVariant &payload) instead

注意: 信號 notification 在此類中被重載。通過使用函數指針句法連接到此信號,Qt 提供用於獲得如此範例展示的函數指針的方便幫助程序:

connect(sqlDriver, QOverload<const QString &>::of(&QSqlDriver::notification),
    [=](const QString &name){ /* ... */ });
					

該函數在 Qt 4.4 引入。

另請參閱 subscribeToNotification ().