Dictionary management for application-defined dictionaries. 更多...
头: | #include <QVirtualKeyboardDictionaryManager> |
CMake: |
find_package(Qt6 REQUIRED COMPONENTS VirtualKeyboard)
target_link_libraries(mytarget PRIVATE Qt6::VirtualKeyboard) |
qmake: | QT += virtualkeyboard |
继承: | QObject |
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 ) |
void | activeDictionariesChanged () |
void | availableDictionariesChanged () |
void | baseDictionariesChanged () |
void | extraDictionariesChanged () |
QVirtualKeyboardDictionaryManager * | instance () |
This class allows you to manage dictionaries for virtual keyboard input methods. Dictionaries are application-defined and can be activated in the desired context.
注意: 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:
createDictionary()
函数。
To activate dictionaries from QML, use the VirtualKeyboard attached type.
[read-only]
activeDictionaries
: const
QStringList
This property holds the list of currently active dictionaries.
This property holds the list of active dictionaries, which is a combination of unique names included in baseDictionaries and extraDictionaries .
访问函数:
QStringList | activeDictionaries () const |
通知程序信号:
void | activeDictionariesChanged () |
[read-only]
availableDictionaries
: const
QStringList
This property holds the list of all dictionaries.
This property holds the names of all existing dictionaries.
访问函数:
QStringList | availableDictionaries () const |
通知程序信号:
void | availableDictionariesChanged () |
This property holds the list of currently active base dictionaries.
This property holds the names of base dictionaries. The application manages this property.
访问函数:
QStringList | baseDictionaries () const |
void | setBaseDictionaries (const QStringList & baseDictionaries ) |
通知程序信号:
void | baseDictionariesChanged () |
This property holds the list of currently active extra dictionaries.
This property holds the names of extra dictionaries. The application manages this property.
访问函数:
QStringList | extraDictionaries () const |
void | setExtraDictionaries (const QStringList & extraDictionaries ) |
通知程序信号:
void | extraDictionariesChanged () |
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.
另请参阅 dictionary ().
Returns an existing dictionary with the given
name
if it exists, otherwise returns
nullptr
.
另请参阅 createDictionary ().
[static]
QVirtualKeyboardDictionaryManager
*QVirtualKeyboardDictionaryManager::
instance
()
Returns the singleton instance of the QVirtualKeyboardDictionaryManager .
All the functionalities must be called from the main thread.