Keys.Context1与Qt / QML绑定的关键是什么?(What key is Keys.Context1 tied to in Qt/QML?)
我正在构建一个概念验证应用程序,在Windows上,测试我可以用QML做什么,但最终结果将在嵌入式Linux系统上运行(我也需要学习)。 我一直在处理键处理(Enter,Up,down,Left和Right等),并注意到有4个键被标记为Context1到4。
在QtQuick文档中,引用了Keys.Context1..4以及相关的onPressed事件,但未提及它们的使用方式。
context1Pressed(KeyEvent事件)
按下Context1键时会发出此信号。 event参数提供有关事件的信息。
相应的处理程序是onContext1Pressed。
如何找出这些绑定的物理键,或者如何指定它们绑定的键?
I'm currently building a proof of concept application, on windows, testing out what I can do with QML but the end result is going to run on an embedded Linux system (which I'll need to learn too). I've been working with key handling (Enter, Up, down, Left and Right etc.) and noticed that there are 4 keys marked as Context1 to 4.
In the QtQuick docs there is reference to Keys.Context1..4 with associated onPressed events but not about how they are used.
context1Pressed(KeyEvent event)
This signal is emitted when the Context1 key has been pressed. The event parameter provides information about the event.
The corresponding handler is onContext1Pressed.
How do I find out what physical keys these are bound to, or how can I specify which keys they bind to?
原文:https://stackoverflow.com/questions/24610591
最满意答案
好的我找到了解决方案! 如果我把col-sm-12放在
<ul>
它会得到一个高度。 在隐藏.more-items列表之前我甚至不需要计算它:-)更新了jsfiddle: https ://jsfiddle.net/vn1z6z9L/3/
<div class="container"> <div class="row"> <ul class="items col-sm-12"> <li class="item col-sm-4">asf</li> <li class="item col-sm-4">dd</li> <li class="item col-sm-4">ssddf</li> <li class="item col-sm-4">as</li> <li class="item col-sm-4">sdf</li> <li class="item col-sm-4">sdf</li> <li class="item col-sm-4">as</li> <li class="item col-sm-4">sdf</li> <li class="item col-sm-4">sdf</li> </ul> <ul class="more-items col-sm-12"> <li class="item col-sm-4">as</li> <li class="item col-sm-4">sdf</li> <li class="item col-sm-4">sdf</li> <li class="item col-sm-4">as</li> <li class="item col-sm-4">sdf</li> <li class="item col-sm-4">sdf</li> </ul> </div>
OK I found the solution! If I put col-sm-12 on the
<ul>
it gets a height. I don't even need to calculate it before hiding the .more-items list :-)Updated jsfiddle: https://jsfiddle.net/vn1z6z9L/3/
<div class="container"> <div class="row"> <ul class="items col-sm-12"> <li class="item col-sm-4">asf</li> <li class="item col-sm-4">dd</li> <li class="item col-sm-4">ssddf</li> <li class="item col-sm-4">as</li> <li class="item col-sm-4">sdf</li> <li class="item col-sm-4">sdf</li> <li class="item col-sm-4">as</li> <li class="item col-sm-4">sdf</li> <li class="item col-sm-4">sdf</li> </ul> <ul class="more-items col-sm-12"> <li class="item col-sm-4">as</li> <li class="item col-sm-4">sdf</li> <li class="item col-sm-4">sdf</li> <li class="item col-sm-4">as</li> <li class="item col-sm-4">sdf</li> <li class="item col-sm-4">sdf</li> </ul> </div>
相关问答
更多-
好的我找到了解决方案! 如果我把col-sm-12放在
- 它会得到一个高度。 在隐藏.more-items列表之前我甚至不需要计算它:-) 更新了jsfiddle: https ://jsfiddle.net/vn1z6z9L/3/
- asf
-
只需使用sildeDown和slideUp即可解决您的问题。试试这个小提琴 。 刚刚使用slideUp和Slide Down方法代替添加和删除活动类。 $(document).ready(function(){ $('.content').hide(); }); $(document).on('click',".center",function(){ $(".content").slideUp(300); $(this).next(".content").slideDown(3 ...
-
jQuery将行附加到表,而slideDown效果正在破坏表行(jQuery append row to table and slideDown effect is corrupting the table row)[2023-03-21]
看起来像是如何在表格行上使用slideDown(或show)函数的副本? 简短的回答是jQuery动画在不是块元素的事情上不能很好地工作,特别是对表格行和单元格不起作用。 Looks like a duplicate of How to Use slideDown (or show) function on a table row? The short answer is that jQuery animations don't work well on things that aren't block e ... -
Jquery slideUp()slideDown()跳转故障,WordPress(Jquery slideUp() slideDown() jump glitch, WordPress)[2023-08-06]
我发现这个问题所以如果有其他人遇到这个问题,我会发布它。 内容div有一些旧的CSS来自测试我交换类Qith Jquery和使用CSS转换。 这不正常,所以我去使用slideUp()和slideDown() 。 一旦我添加了似乎导致故障的jquery,我忘了删除那些转换。 一旦我删除了CSS过渡,就没有更多的跳跃,现在一切都很顺利。 I found the problem so figured I'd post it if anyone else runs into this. The content di ... -
尝试这个: jQuery(document).scroll(function() { y = jQuery(this).scrollTop(); if (y > 100) { jQuery(".navbar-fixed-top").stop().slideDown(); } else { jQuery(".navbar-fixed-top").stop().slideUp(); } }); Try this: jQuery(document) ...
-
由于H2元素有利润率而发生“跳跃”,根据CSS的规则,垂直利润率将崩溃 。 在动画开始之前,您将H2标题与表格分开。 标题上面和下面有一些边距,表没有: +--------------------------+ | | |H2: April | | | +--------------------------+ |||||||||||||||||||||||||||| |TABL ...
-
这可能但不完全简单。 我在这之前就完成了(视频悬停) 。 这个概念基本上是: 在当前元素上设置相对位置(您正在浮动的元素,或者如果更有意义,则为其父元素)。 这可以在CSS中静态设置。 创建一个新元素,使用相同的尺寸对其进行相似的样式,并使用position:absolute和z-index:...将其position:absolute在当前元素的正上方z-index:... 使用slideDown(或根据最有意义的方式改变高度),它应该高于其他内容 It's possible but not entire ...
-
我在您的代码中看到的一个问题是,您使用$(this).data('url')将url数据属性值设置为单击的tr。 但$(this)实际上是$('#details')因为你在$('#details')的slideUp中访问它,它没有url data属性。 所以你必须得到一个错误 解决方案是将$(this )(单击的行)分配给局部变量,并在其他回调函数中使用它。 这应该工作。 $(function () { $('.details').click(function () { var ...
-
我最好的猜测是,因为你使用的是jQuery的超薄版本,它没有所有的功能。 使用完整版。 以下是删除功能的超薄版本的评论 /*! jQuery v3.2.1 -ajax,-ajax/jso ...
-
加载jQuery slideDown(jQuery slideDown on load)[2022-05-03]
这只是因为$()。load()不是立竿见影的。 第三个参数是回调,而不是在加载完成时运行,因此,您需要等待向下滑动(未测试,对不起)。 你能试试吗? $('#details')。load($(this).data('url'),{id:$(this).data('id')},function(){$(this).slideDown('慢'); }); 并告诉我们它是否有效。 It's just because $().load() is not immediate. There is a third par ... - GitHub创建SSH Keys
- java 监听redis过期key事件实现延迟队列功能
- 如何取得Map当中的key
- 关键是贵了
- Tomcat6 不修改server.xml和conf/context.xml配置数据源的问题.
- Memcached get 获取key对应的值
- Memcached delete 删除key
- 关键数据结构
- 别拿Hadoop map key当id使
- Memcached replace 替换已存在的 key命令
- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)
相关文章
更多最新问答
更多