QFrame Class ReferenceThe QFrame class is the base class of widgets that can have a frame. Далее... #include <QFrame> Унаследован от: QWidget. Inherited by: Q3Frame, Q3ProgressBar, QAbstractScrollArea, QLabel, QLCDNumber, QSplitter, QStackedWidget, and QToolBox. Открытые типы
Свойства
Открытые функции
Переопределённые открытые функции
Переопределённые защищённые функции
Дополнительные унаследованные члены
Подробное описаниеThe QFrame class is the base class of widgets that can have a frame. QMenu uses this to "raise" the menu above the surrounding screen. QProgressBar has a "sunken" look. QLabel has a flat look. The frames of widgets like these can be changed. QLabel label(...); label.setFrameStyle(QFrame::Panel | QFrame::Raised); label.setLineWidth(2); QProgressBar pbar(...); label.setFrameStyle(QFrame::NoFrame); The QFrame class can also be used directly for creating simple placeholder frames without any contents. The frame style is specified by a frame shape and a shadow style that is used to visually separate the frame from surrounding widgets. These properties can be set together using the setFrameStyle() function and read with frameStyle(). The frame shapes are NoFrame, Box, Panel, StyledPanel, HLine and VLine; the shadow styles are Plain, Raised and Sunken. A frame widget has three attributes that describe the thickness of the border: lineWidth, midLineWidth, and frameWidth.
The margin between the frame and the contents of the frame can be customized with the QWidget::setContentsMargins() function. This table shows some of the combinations of styles and line widths: Описание типов-членовenum QFrame::ShadowThis enum type defines the types of shadow that are used to give a 3D effect to frames.
Shadow interacts with QFrame::Shape, the lineWidth() and the midLineWidth(). See the picture of the frames in the main class documentation. See also QFrame::Shape, lineWidth(), and midLineWidth(). enum QFrame::ShapeThis enum type defines the shapes of frame available.
When it does not call QStyle, Shape interacts with QFrame::Shadow, the lineWidth() and the midLineWidth() to create the total result. See the picture of the frames in the main class documentation. See also QFrame::Shadow, QFrame::style(), and QStyle::drawPrimitive(). enum QFrame::StyleMaskThis enum defines two constants that can be used to extract the two components of frameStyle():
Normally, you don't need to use these, since frameShadow() and frameShape() already extract the Shadow and the Shape parts of frameStyle(). See also frameStyle() and setFrameStyle(). Описание свойствframeRect : QRectThis property holds the frame's rectangle. The frame's rectangle is the rectangle the frame is drawn in. By default, this is the entire widget. Setting the rectangle does does not cause a widget update. The frame rectangle is automatically adjusted when the widget changes size. If you set the rectangle to a null rectangle (for example, QRect(0, 0, 0, 0)), then the resulting frame rectangle is equivalent to the widget rectangle. Функции доступа:
frameShadow : ShadowThis property holds the frame shadow value from the frame style. Функции доступа:
See also frameStyle() and frameShape(). frameShape : ShapeThis property holds the frame shape value from the frame style. Функции доступа:
See also frameStyle() and frameShadow(). frameWidth : const intThis property holds the width of the frame that is drawn. Note that the frame width depends on the frame style, not only the line width and the mid-line width. For example, the style specified by NoFrame always has a frame width of 0, whereas the style Panel has a frame width equivalent to the line width. Функции доступа:
See also lineWidth(), midLineWidth(), and frameStyle(). lineWidth : intThis property holds the line width. Note that the total line width for frames used as separators (HLine and VLine) is specified by frameWidth. Значение по умолчанию равно 1. Функции доступа:
See also midLineWidth and frameWidth. midLineWidth : intThis property holds the width of the mid-line. Значение по умолчанию равно 0. Функции доступа:
See also lineWidth and frameWidth. Описание функций-членовQFrame::QFrame ( QWidget * parent = 0, Qt::WindowFlags f = 0 )Constructs a frame widget with frame style NoFrame and a 1-pixel frame width. The parent and f arguments are passed to the QWidget constructor. QFrame::~QFrame ()Destroys the frame. void QFrame::changeEvent ( QEvent * ev ) [virtual protected]Переопределено от QWidget::changeEvent(). bool QFrame::event ( QEvent * e ) [virtual protected]Переопределено от QObject::event(). int QFrame::frameStyle () constReturns the frame style. The default value is QFrame::Plain. See also setFrameStyle(), frameShape(), and frameShadow(). void QFrame::paintEvent ( QPaintEvent * ) [virtual protected]Переопределено от QWidget::paintEvent(). void QFrame::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 the picture of the frames in the main class documentation. The frame shapes are given in QFrame::Shape and the shadow styles in QFrame::Shadow. If a mid-line width greater than 0 is specified, an additional line is drawn for Raised or Sunken Box, HLine, and VLine frames. The mid-color of the current color group is used for drawing middle lines. See also frameStyle(). QSize QFrame::sizeHint () const [virtual]Переопределено от QWidget::sizeHint(). |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |