C++ (Qt)QStyle::subElementRect(SE_HeaderLabel)QStyle::subElementRect(SE_HeaderArrow)
C++ (Qt)QRect HeaderStyle::subElementRect(SubElement subElement, const QStyleOption *option, const QWidget *widget) const{ if (subElement == QStyle::SE_HeaderArrow) { QRect rect = QCommonStyle::subElementRect(subElement, option, widget); rect.setLeft(5); return rect; } return QCommonStyle::subElementRect(subElement, option, widget);}
C++ (Qt)treeWidget->header()->setStyle(new HeaderStyle)
C++ (Qt)QRect HeaderStyle::subElementRect(SubElement subElement, const QStyleOption *option, const QWidget *widget) const{ if (subElement == QStyle::SE_HeaderArrow) { QRect headerLabelRect = QProxyStyle::subElementRect(QStyle::SE_HeaderLabel, option, widget); int left = headerLabelRect.left() + 5; QRect rect = QProxyStyle::subElementRect(subElement, option, widget); rect.moveLeft(left); return rect; } return QProxyStyle::subElementRect(subElement, option, widget);}
C++ (Qt)QRect HeaderStyle::subElementRect(SubElement subElement, const QStyleOption *option, const QWidget *widget) const{ if (subElement == QStyle::SE_HeaderArrow) { QRect headerLabelRect = QProxyStyle::subElementRect(QStyle::SE_HeaderLabel, option, widget); int left = headerLabelRect.left() + 5; QRect rect = QProxyStyle::subElementRect(subElement, option, widget); rect.moveLeft(left); return rect; } else if (subElement == QStyle::SE_HeaderLabel) { qDebug() << 123; } return QProxyStyle::subElementRect(subElement, option, widget);}