• <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 閱讀(2606) 評論(0)  編輯 收藏 引用 所屬分類: QT編程
             
            久久国产精品偷99| 国产韩国精品一区二区三区久久| 亚洲乱亚洲乱淫久久| 99久久婷婷国产综合精品草原| 久久99久久成人免费播放| 久久亚洲日韩看片无码| 久久国产亚洲高清观看| 日批日出水久久亚洲精品tv| 欧美精品久久久久久久自慰| 久久久久亚洲AV无码去区首| 亚洲va久久久噜噜噜久久| 天天爽天天爽天天片a久久网| 国产午夜电影久久| 久久香蕉国产线看观看精品yw| 久久综合中文字幕| 久久久久久久亚洲Av无码| 久久久久这里只有精品 | 久久综合国产乱子伦精品免费| 一本大道加勒比久久综合| 欧美精品国产综合久久| 久久成人永久免费播放| 九九99精品久久久久久| 久久水蜜桃亚洲av无码精品麻豆| 久久久精品久久久久久| 51久久夜色精品国产| 久久精品国产亚洲av麻豆色欲| 久久五月精品中文字幕| 99热精品久久只有精品| 久久丫精品国产亚洲av不卡| 久久久久久久精品成人热色戒| 久久激情亚洲精品无码?V| 色综合久久精品中文字幕首页| 亚洲AV成人无码久久精品老人| 久久婷婷午色综合夜啪| 国产精品久久久久久五月尺| 久久久久亚洲?V成人无码| 精品无码久久久久久久动漫| 99久久国产综合精品成人影院| 99久久99久久| 国产高清美女一级a毛片久久w| 99久久免费国产精精品|