项目2的学习,Dialog文件夹。
1.给label设置不同的属性,让它是一个画板什么的都可以。
nameLabel = new QLabel(tr("LiMing"));//定义label风格
nameLabel->setFrameStyle(QFrame::Panel|QFrame::Sunken);
2.解释说明setFrameStyle的风格特征。//用多个可以巧妙利用|或运算符。
void Q3GroupBox::setFrameStyle ( int style )
Sets the frame style to style. The style is the bitwise OR between a
frame shape and a frame shadow style.
See also frameStyle().
在QFrame中定义的enum枚举类型的数据enum QFrame::Shape;定义枚举类型。
QFrame::NoFrame 0 QFrame draws nothing
QFrame中得到的不同的风格。
QFrame::Box 0x0001 QFrame draws a box around its contents
QFrame::Panel 0x0002 QFrame draws a panel to make the contents appear raised or
sunken
QFrame::StyledPanel 0x0006 draws a rectangular panel with a look that depends on
the current GUI style. It can be raised or sunken.
QFrame::HLine 0x0004 QFrame draws a horizontal line that frames nothing (useful as
separator)
QFrame::VLine 0x0005 QFrame draws a vertical line that frames nothing (useful as
separator)
QFrame::WinPanel 0x0003 draws a rectangular panel that can be raised or sunken
like those in Windows 2000. Specifying this shape sets the line width to 2
pixels.
WinPanel is provided for compatibility. For GUI style independence we
recommend using StyledPanel instead.
阅读(3066) | 评论(0) | 转发(0) |