How to custom qml virtual keyboard ?
-
@small_bird
any console output?
what is the content ofQT_VIRTUALKEYBOARD_LAYOUT_PATH
?
Did you add an InputPanel element to your application?
...@raven-worx
The QT_VIRTUALKEYBOARD_LAYOUT_PATH is QByteArray(":/layouts/en_GB").
No InputPanel. -
@raven-worx
The QT_VIRTUALKEYBOARD_LAYOUT_PATH is QByteArray(":/layouts/en_GB").
No InputPanel.@small_bird said in How to custom qml virtual keyboard ?:
The QT_VIRTUALKEYBOARD_LAYOUT_PATH is QByteArray(":/layouts/en_GB").
as i stated it should be
:/layouts
only -
@small_bird said in How to custom qml virtual keyboard ?:
The QT_VIRTUALKEYBOARD_LAYOUT_PATH is QByteArray(":/layouts/en_GB").
as i stated it should be
:/layouts
only@raven-worx Thanks a lot! I have made it!
-
@small_bird said in How to custom qml virtual keyboard ?:
The QT_VIRTUALKEYBOARD_LAYOUT_PATH is QByteArray(":/layouts/en_GB").
as i stated it should be
:/layouts
onlyThis post is deleted! -
@small_bird said in How to custom qml virtual keyboard ?:
The QT_VIRTUALKEYBOARD_LAYOUT_PATH is QByteArray(":/layouts/en_GB").
as i stated it should be
:/layouts
only@raven-worx How to change the background color of the keyboard, for example, from black to transparent.
-
@raven-worx How to change the background color of the keyboard, for example, from black to transparent.
@small_bird said in How to custom qml virtual keyboard ?:
How to change the background color of the keyboard, for example, from black to transparent.
did you read the link from my first post at all?
https://doc.qt.io/qt-5.11/technical-guide.html#keyboard-styles -
@small_bird said in How to custom qml virtual keyboard ?:
How to change the background color of the keyboard, for example, from black to transparent.
did you read the link from my first post at all?
https://doc.qt.io/qt-5.11/technical-guide.html#keyboard-styles@raven-worx Yes, I have read that, however, it does not work, this is my shortcut of path:
-
@raven-worx Yes, I have read that, however, it does not work, this is my shortcut of path:
- set the
QT_VIRTUALKEYBOARD_STYLE
to_STYLENAME_
- put the style.qml into your existing qrc (e.g. to the path
:/kbstyles/test.qml
:/kbstyles/QtQuick/VirtualKeyboard/Styles/_STYLENAME_/style.qml
) - add the import path to your QQmlEngine (
engine->addImportPath(":/kbstyles")
)
did you copy the existing (default) virtual keyboard style and made your changes upon it?
- set the
-
- set the
QT_VIRTUALKEYBOARD_STYLE
to_STYLENAME_
- put the style.qml into your existing qrc (e.g. to the path
:/kbstyles/test.qml
:/kbstyles/QtQuick/VirtualKeyboard/Styles/_STYLENAME_/style.qml
) - add the import path to your QQmlEngine (
engine->addImportPath(":/kbstyles")
)
did you copy the existing (default) virtual keyboard style and made your changes upon it?
@raven-worx Yes, I have done that. "set the QT_VIRTUALKEYBOARD_STYLE to test"? What is the meaning? to test.qml file?
- set the
-
@raven-worx Yes, I have done that. "set the QT_VIRTUALKEYBOARD_STYLE to test"? What is the meaning? to test.qml file?
@small_bird
the name of theqml filefolder containing style.qml -
@small_bird
the name of theqml filefolder containing style.qml@raven-worx
Is this all right? -
@raven-worx
Is this all right?@small_bird
you said you read the link didnt you?!
you should set it as a env variable!
qputenv("QT_VIRTUALKEYBOARD_STYLE", "test");
-
@small_bird
you said you read the link didnt you?!
you should set it as a env variable!
qputenv("QT_VIRTUALKEYBOARD_STYLE", "test");
@raven-worx
Another problem happens! -
@raven-worx
Another problem happens!@small_bird
read my post (regarding the style setup) again line by line and compare it to your code.
Why do you add the layout path to the engine's import path?!The keyboard styles and layout are different concepts, so don't mix them up.
-
@small_bird
read my post (regarding the style setup) again line by line and compare it to your code.
Why do you add the layout path to the engine's import path?!The keyboard styles and layout are different concepts, so don't mix them up.
@raven-worx
The out put is the same! -
@small_bird
read my post (regarding the style setup) again line by line and compare it to your code.
Why do you add the layout path to the engine's import path?!The keyboard styles and layout are different concepts, so don't mix them up.
@raven-worx The output is "Can not find style "style" - fallback: "default"
-
@raven-worx The output is "Can not find style "style" - fallback: "default"
@small_bird
my "fault". but anyway again this is described in the link i've posted.In the given import path Qt expects the style to be in the path
/QtQuick/VirtualKeyboard/Styles
So add yourstyle.qml
into the following qrc path (where STYLENAME is the name you provide in theQT_VIRTUALKEYBOARD_STYLE
env variable):
:/kbstyles/QtQuick/VirtualKeyboard/Styles/STYLENAME
=> so it becomes:/kbstyles/QtQuick/VirtualKeyboard/Styles/STYLENAME/style.qml
So
QT_VIRTUALKEYBOARD_STYLE
determines the folder name (which contains a style.qml) not the name of the qml file itself. -
@small_bird
my "fault". but anyway again this is described in the link i've posted.In the given import path Qt expects the style to be in the path
/QtQuick/VirtualKeyboard/Styles
So add yourstyle.qml
into the following qrc path (where STYLENAME is the name you provide in theQT_VIRTUALKEYBOARD_STYLE
env variable):
:/kbstyles/QtQuick/VirtualKeyboard/Styles/STYLENAME
=> so it becomes:/kbstyles/QtQuick/VirtualKeyboard/Styles/STYLENAME/style.qml
So
QT_VIRTUALKEYBOARD_STYLE
determines the folder name (which contains a style.qml) not the name of the qml file itself. -
@small_bird
last time...
engine->addImportPath(":/kbstyles")
-
@small_bird
last time...
engine->addImportPath(":/kbstyles")
@raven-worx Does not work, thanks all the same!