Qt Creator 中的按钮是否有隐藏属性? [英] Is there a hide property for pushbutton in Qt Creator?

查看:54
本文介绍了Qt Creator 中的按钮是否有隐藏属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Qt Creator 属性托盘中是否有按钮的隐藏属性?我试图找到一个,但我找不到.我需要让一些按钮禁用 &有些隐藏.我应该使用属性托盘还是在构造函数中使用它?稍后在用户事件中,它们将被启用 &显示.

Is there a hide property for pushbutton in Qt Creator property pallet? I am trying to find one but I am not able to find. I need to make some buttons disable & some hide. Should I use property pallet for it OR do it in constructor? Later on user event, they will be enable & shown.

推荐答案

有些控件在调色板上具有可见性"属性,有些则没有.您始终可以以编程方式执行此操作(例如在对话框的构造函数中):

Some controls have "visibility" property on the palette, some don't. You always may do that programmatically (for example in the dialog's constructor):

MyButton->setVisible(false); //or true - later in the code

这篇关于Qt Creator 中的按钮是否有隐藏属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆