QVirtualKeyboardDictionaryManager Class
Dictionary management for application-defined dictionaries. More...
Header: | #include <QVirtualKeyboardDictionaryManager> |
CMake: | find_package(Qt6 COMPONENTS VirtualKeyboard REQUIRED) target_link_libraries(mytarget PRIVATE Qt6::VirtualKeyboard) |
qmake: | QT += virtualkeyboard |
Inherits: | QObject |
Public Functions
QStringList | activeDictionaries() const |
QStringList | availableDictionaries() const |
QStringList | baseDictionaries() const |
QVirtualKeyboardDictionary * | createDictionary(const QString &name) |
QVirtualKeyboardDictionary * | dictionary(const QString &name) const |
QStringList | extraDictionaries() const |
void | setBaseDictionaries(const QStringList &baseDictionaries) |
void | setExtraDictionaries(const QStringList &extraDictionaries) |
Signals
void | activeDictionariesChanged() |
void | availableDictionariesChanged() |
void | baseDictionariesChanged() |
void | extraDictionariesChanged() |
Static Public Members
QVirtualKeyboardDictionaryManager * | instance() |
Detailed Description
This class allows you to manage dictionaries for virtual keyboard input methods. Dictionaries are application-defined and can be activated in the desired context.
Note: Dictionaries do not refer to the built-in dictionaries of the input method, but to the application's own dictionaries (for example, a phonebook application).
The following operations are supported by the dictionary manager:
- Create dictionaries using the
createDictionary()
function. - Add or modify content of the dictionary instance.
- Activate dictionaries by adding them to the list of base dictionaries or extra dictionaries.
To activate dictionaries from QML, use the VirtualKeyboard attached type.
Member Function Documentation
QVirtualKeyboardDictionary *QVirtualKeyboardDictionaryManager::createDictionary(const QString &name)
Create a dictionary with the given name or return the dictionary if it already exists.
The dictionary instance is owned by the dictionary manager and must not be destroyed manually. To free memory allocated for the dictionary, the application may reset the contents of the dictionary.
QVirtualKeyboardDictionary *QVirtualKeyboardDictionaryManager::dictionary(const QString &name) const
Returns an existing dictionary if it exists.
[static]
QVirtualKeyboardDictionaryManager *QVirtualKeyboardDictionaryManager::instance()
Returns the singleton instance of the QVirtualKeyboardDictionaryManager.
All the functionalities must be called from the main thread.
© 2021 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. Qt and 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.