当前位置:网站首页>QT QML virtual keyboard
QT QML virtual keyboard
2022-07-24 16:42:00 【Liu-Eleven】
Keyboard style 1 :

Keyboard style II :

Qt Official soft keyboard example :

Want to use Qt Virtual keyboard in , The following steps are required :
1. Amend your .pro file , Add the following :
static {
QT += svg
QTPLUGIN += qtvirtualkeyboardplugin
}
QT_VIRTUALKEYBOARD_STYLE=qtvirtualkeyboard myapp2. stay main.cpp Add the following code in :
qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));3. stay QML Add the following to the file :
import QtQuick.VirtualKeyboard 2.13
InputPanel {
id: inputPanel
z: 99
x: (window.width-inputPanel.width)*0.5
y: window.height
width:getwidth(window.width,window.height,dp(1100))
states: State {
name: "visible"
when: inputPanel.active
PropertyChanges {
target: inputPanel
y: window.height - inputPanel.height
}
}
transitions: Transition {
from: ""
to: "visible"
reversible: true
// Set the keyboard pop-up effect
ParallelAnimation {
NumberAnimation {
properties: "y"
// Transition time
duration: 100
// Pop up effect
easing.type: Easing.InOutQuad
}
}
}
}
Go through the three steps above , You can fall out QML Virtual keyboard for .
If you want to change the keyboard style, change main.cpp, Add the following :
qputenv("QT_VIRTUALKEYBOARD_STYLE", QByteArray("retro"));Documents of the gods :
http://www.qtcn.org/bbs/read-htm-tid-63420.html
https://blog.csdn.net/zbw1185/article/details/79982787
https://blog.csdn.net/qq_35556006/article/details/104659154
边栏推荐
- Princeton calculus reader 02 Chapter 1 -- composition of functions, odd and even functions, function images
- Codeforces round 690 (Div. 3) B. last year's substring conventional solution
- 安全的证券公司有哪些?我想在手机上买股票
- EF data migration
- Thinkphp3.2.5 cannot jump to external links
- Minor record
- Jenkins CLI 命令详解
- Sword finger offer 22. the penultimate node in the linked list
- Envi grid resampling
- Sword finger offer 25. merge two sorted linked lists
猜你喜欢
随机推荐
工信安全中心牵头搭建数据流通平台 蚂蚁集团等厂商提供技术支持
Best practices for preventing XSS in PHP web applications
Educational codeforces round 100 (rated for Div. 2) B. find the array solution
Why should we launch getaverse?
[machine learning basics] - another perspective to explain SVM
IP的概念,IP的分类,IP复用技术
Qt设计机器人仿真控制器——按键控制机器人关节转动
剑指 Offer 22. 链表中倒数第k个节点
AXI协议(3):AXI架构的握手机制和实现细节
With notes: printing order of synchronous, asynchronous, micro task and macro task
Intel plans to sell baseband chip business, but Apple has given up?
双亲委派机制
You really should go to the factory to move bricks!
Multithreading (basic)
1184. 公交站间的距离
[LeetCode]巧用位运算
TCP protocol debugging tool tcpengine v1.3.0 tutorial
Creation and inheritance of JS class
js,for循环内callback异步转换成同步执行
1309. Decode letter to integer mapping









