Logo Search packages:      
Sourcecode: qt4-x11 version File versions

T qstyleoption_cast< T > ( const QStyleOption option  )  [related, inherited]

the alignment of the display value for the item

QStyleOptionViewItem::displayAlignment The default value is Qt::AlignLeft.

QStyleOptionViewItem::decorationAlignment the alignment of the decoration for the item The default value is Qt::AlignLeft.

QStyleOptionViewItem::decorationPosition the position of the decoration for the item The default value is Left.

See also:
QStyleOptionViewItem::decorationSize the size of the decoration for the item The default value is QSize(-1, -1), i.e. an invalid size.

See also:
decorationAlignment, decorationPosition
QStyleOptionViewItem::font the font used for the item By default, the application's default font is used.

See also:
Returns a T or 0 depending on the {QStyleOption::type}{type} and {QStyleOption::version}{version} of the given option.


doc/src/snippets/qstyleoption/main.cpp 4

See also:
QStyleOption::type, QStyleOption::version

Definition at line 815 of file qstyleoption.h.

References QStyleOption::type, and QStyleOption::version.

Referenced by QStyleOptionViewItemV2::operator=(), QStyleOptionToolBoxV2::operator=(), QStyleOptionProgressBarV2::operator=(), QStyleOptionFrameV2::operator=(), QStyleOptionFrameV2::QStyleOptionFrameV2(), QStyleOptionProgressBarV2::QStyleOptionProgressBarV2(), and QStyleOptionToolBoxV2::QStyleOptionToolBoxV2().

    if (opt && opt->version >= static_cast<T>(0)->Version && (opt->type == static_cast<T>(0)->Type
        || int(static_cast<T>(0)->Type) == QStyleOption::SO_Default
        || (int(static_cast<T>(0)->Type) == QStyleOption::SO_Complex
            && opt->type > QStyleOption::SO_Complex)))
        return static_cast<T>(opt);
    return 0;

Generated by  Doxygen 1.6.0   Back to index