• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            Cpper
            C/C++高級工程師 Android高級軟件工程師 IT集成工程師 音頻工程師 熟悉c,c++,java,c#,py,js,asp等多種語言 程序猿
            重新風格項代理QStyledItemDelegat

            class QLineDelegate : public QStyledItemDelegate
            {
                Q_OBJECT
            public:
                QLineDelegate(QTableView
            * tableView);
            protected:
                
            void paint(QPainter* painter,const QStyleOptionViewItem& option,const QModelIndex& index) const;
            private:
                QPen         pen;
                QTableView
            *  view;
            };

            #include <QPainter>
            #include 
            "QLineDelegate.h"

            QLineDelegate::QLineDelegate(QTableView
            * tableView)
            {
                
            int gridHint = tableView->style()->styleHint(QStyle::SH_Table_GridLineColor, new QStyleOptionViewItemV4());
                QColor gridColor 
            = static_cast<QRgb>(gridHint);
                pen 
            = QPen(gridColor, 0, tableView->gridStyle());
                view 
            = tableView;
            }

            void QLineDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option,const QModelIndex& index)const
            {
                QStyleOptionViewItem itemOption(option);
                
            if(itemOption.state & QStyle::State_HasFocus)
                    itemOption.state 
            = itemOption.state ^ QStyle::State_HasFocus;
                QStyledItemDelegate::paint(painter,itemOption,index);
                QPen oldPen 
            = painter->pen();
                painter
            ->setPen(pen);
                
            //painter->drawLine(option.rect.topRight(),option.rect.bottomRight());
                painter->drawLine(itemOption.rect.bottomLeft(),itemOption.rect.bottomRight());
                painter
            ->setPen(oldPen);
            }
            posted on 2011-11-25 20:22 ccsdu2009 閱讀(2608) 評論(0)  編輯 收藏 引用 所屬分類: QT編程
             
            一本久久综合亚洲鲁鲁五月天| 一本一本久久A久久综合精品| 狠狠干狠狠久久| 亚洲精品国产成人99久久| 午夜不卡888久久| 人妻少妇精品久久| 久久天天躁狠狠躁夜夜躁2014| 精产国品久久一二三产区区别 | 国产精品一久久香蕉国产线看 | 久久精品无码一区二区app| 久久无码人妻精品一区二区三区 | 亚洲欧美日韩中文久久| 欧美精品一区二区精品久久| 久久精品成人免费观看97| 久久热这里只有精品在线观看| 91精品无码久久久久久五月天| 伊人热热久久原色播放www| 77777亚洲午夜久久多喷| 亚洲色欲久久久久综合网| 欧美一区二区三区久久综| 亚洲а∨天堂久久精品| 国产精品视频久久久| 久久精品国产网红主播| 思思久久99热只有频精品66| 青青草原综合久久| 99久久婷婷免费国产综合精品| 99精品国产综合久久久久五月天| 精品久久久久久无码免费| 久久国产精品成人免费| 精品久久久噜噜噜久久久 | 东京热TOKYO综合久久精品| 久久久久久久久久久| 中文字幕无码久久人妻| 久久精品国产福利国产琪琪| 国产精品久久久福利| 国产美女久久久| 亚洲天堂久久精品| 久久se这里只有精品| 久久久久99精品成人片牛牛影视| 91亚洲国产成人久久精品网址| 国产欧美久久久精品|