博客
关于我
PyQt(Python+Qt)入门:设计师中部件toolTip、statusTip、whatsThis的属性
阅读量:81 次
发布时间:2019-02-25

本文共 752 字,大约阅读时间需要 2 分钟。

在Qt Designer中定义的部件,都有toolTip、statusTip、whatsThis,这些属性都是辅助提示的信息。

toolTip

toolTip属性设置部件的toolTip提示信息,toolTip提示信息在鼠标放到控件上会浮动出一个小框显示提示信息。默认情况下,仅显示活动窗口子部件的toolTip,可以通过在窗口对象设置Qt.WA_AlwaysShowToolTips属性来改变,但不能是需要显示tooTip的部件对象中设置。

如果要控制tooTip显示的行为(如控制显示位置),可以重写部件的event()方法捕获事件类型为QEvent.ToolTip的事件。

缺省值为空,可以通过toolTip()和setToolTip( QString )来读取和设置toolTip。

statusTip

statusTip属性保存statusTip提示信息,statusTip提示信息在鼠标放到控件上时在窗口的状态栏显示提示信息,如果窗口无状态栏则不显示。

statusTip属性 缺省值为空字符串,可以通过statusTip()和setstatusTip ( QString )来读取和设置statusTip。

whatsThis

whatsThis属性保存部件的帮助信息。whatsThis的帮助信息一般在部件获得焦点后按Shift+F1弹出显示,如果这个快捷键被别的功能占用,则whatsThis的帮助信息可能无法展示。有些对话窗提供一个带问号的按钮可以点击显示whatsThis的帮助信息。

whatsThis属性 缺省值为空字符串,可以通过whatsThis()和setwhatsThis ( QString )来读取和设置whatsThis。

老猿Python,跟老猿学Python!

转载地址:http://czm.baihongyu.com/

你可能感兴趣的文章
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
NO 157 去掉禅道访问地址中的zentao
查看>>
no available service ‘default‘ found, please make sure registry config corre seata
查看>>
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
查看>>
no connection could be made because the target machine actively refused it.问题解决
查看>>
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>
No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>
No module named 'pandads'
查看>>
No module named cv2
查看>>
No module named tensorboard.main在安装tensorboardX的时候遇到的问题
查看>>
No module named ‘MySQLdb‘错误解决No module named ‘MySQLdb‘错误解决
查看>>
No new migrations found. Your system is up-to-date.
查看>>
No qualifying bean of type XXX found for dependency XXX.
查看>>
No qualifying bean of type ‘com.netflix.discovery.AbstractDiscoveryClientOptionalArgs<?>‘ available
查看>>
No resource identifier found for attribute 'srcCompat' in package的解决办法
查看>>
no session found for current thread
查看>>