[Qt-interest] Checked column of QTableWidget?
Efan...
efanharris at gmail.com
Thu Mar 19 16:36:01 CET 2009
Use mouse press and release even to implement this, there is no other way I
can thnk of
Efan
2009/3/19 Iurii Gordiienko <hordi at ukr.net>
> Hi
> How can I make the checked column of the QTableWidget?
> I try next code, but I only can draw the checked-box and I don't know how
> can I interaction with it...
> void QHeaderView::paintSection(QPainter* painter, const QRect& rect,int
> logicalIndex)const
> {
> QStyleOptionViewItem opt;//(option);
> opt.rect = rect;
> opt.state = opt.state & ~QStyle::State_HasFocus;
>
> opt.state |= QStyle::State_On;
>
> //const QWidget *widget = d->widget(option);
> QStyle *style = /*widget ? widget->style() : */QApplication::style();
> style->drawPrimitive(QStyle::PE_IndicatorViewItemCheck, &opt, painter,
> 0);
> }
> Qt-4.5.0
> Thanks
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090319/451662ad/attachment.html
More information about the Qt-interest-old
mailing list