按钮类:QPushButton
//创建按钮
QPushButton *button = new QPushButton(“this is a button”,this);
//觉得定位 初始位置xy,按钮的宽高
setGeometry(50,50,100,40);
-
//设置下拉菜单
QMenu menu (self)
setMenu (self, QMenu menu)
showMenu (self)
-
//设置文本和图标
setIcon (self, QIcon icon)
setText (self, QString text)
QIcon icon (self)
QString text (self)
-
//边缘是否消失
bool isFlat (self)
setFlat (self, bool)
-
//按钮变灰
bool isEnabled (self)
setEnabled (self, bool)
-
//常用信号