当前位置:网站首页>Interpretation of QT keypressevent
Interpretation of QT keypressevent
2022-06-13 04:53:00 【qq_ thirty-nine million two hundred and eighty thousand seven h】
Qt KeyPressEvent Function introduction :
KeyPressEvent Is a key press event handler ;
To get a key press event , This part must call setFoucusPolicy() function , Initialize focus , And getting the focus .
When you reload KeyPressEvent Function time , If you don't operate the keys , You need to call the overloaded function of the base class .
default KeyPressEvent function , The user presses the cancel key ( Typical is ESC Key ), Close the ejected part . Other keys will be ignored , Refer to parent components for processing .
Particular attention :
QKeyEvent The first thing that came in was IsAccepted() 了 , You don't have to call QKeyEvent::accept() Set the event status attribute ; If you want to operate the keys , You just don't call the overloaded functions of the base class ;
setFoucusPolicy Reading
Set how the part accepts the key value of the keyboard focus .
Particular attention : The default method is Qt::NoFocus, Do not deal with focus .
KeyPressEvent Use
边栏推荐
- Use go to add massive data to MySQL
- Go scheduled task cron package usage
- Analysis of scoped attribute principle and depth action selector
- Develop go using vscode
- Crawler scrapy framework learning 2
- Tita绩效宝:远程一对一面谈的问题
- PHP development 16 exit module
- Powershell 加域 Add-Computer模块
- 2022道路运输企业安全生产管理人员操作证考试题库及答案
- PostgreSQL Guide: inside exploration (Chapter 10 basic backup and point in time recovery) - Notes
猜你喜欢
The differences between the four startup modes of activity and the applicable scenarios and the setting methods of the two startup modes
2021tami/ image processing: exploiting deep generative priority for versatile image restoration and manipulation
Mind mapping series - Database
Avantages de win8.1 et win10
Robot pose description and coordinate transformation
Analysis of scoped attribute principle and depth action selector
PostgreSQL Guide: Insider exploration (Chapter 7 heap tuples and index only scanning) - Notes
[JS solution] leedcode 200 Number of islands
Normal distribution (Gaussian distribution)
Converting MySQL data to PostgreSQL with Navicat
随机推荐
Optocoupler working principle function electric parameter application circuit
MySQL8.0.13安装教程(有图)
Solution to sudden font change in word document editing
Logical point
PowerShell:因为在此系统上禁止运行脚本,解决方法
无限循环滚动代码阿里巴巴国际站店铺装修代码底图滚动黑色半透明显示效果自定义内容装修代码全屏显示
利用Javeswingjdbc基于mvc设计系统
C # get all callable methods of WebService interface [webmethod]
小C的记事本
JS, how to add grid style
Blockly learning ----1 Work area, block, toolbox
PHP development 16 exit module
2022 question bank and answers for operation certificate examination of safety production management personnel in road transport enterprises
Test question bank and online simulation test for special operation certificate of construction scaffolder (special type of construction work) in 2022
Go scheduled task cron package usage
Colab tutorial (super detailed version) and colab pro/pro+ evaluation
Analysis of the principle of V-model and its application in user defined components
Section 3 - functions
PostgreSQL Guide: inside exploration (Chapter 10 basic backup and point in time recovery) - Notes
NodeJS 解析 GET 请求 url 字符串