[Qt-interest] QTableWidget: how to make read-only certain columns
Miguel Cardenas
mfcardenas at gmail.com
Mon Apr 6 01:45:28 CEST 2009
Hi
I need to make read-only full columns, not specific cells... am working on a
database report generator that will allow to modify some columns (a signal
will update the record), but a few ones should remain untouched (id, item
code, etc).
A solution may be making read-only every cell from every column at every
line, but it should consume more processor than a single call for a whole
column...
Lets see what say other users about this...
Thanks for your help!
Miguel
On Sun, Apr 5, 2009 at 2:02 PM, AngelWarrior <srikanth.bemineni at gmail.com>wrote:
> void QTableWidgetItem::setFlags ( Qt::ItemFlags<http://doc.trolltech.com/4.4/qt.html#ItemFlag-enum>
> *flags* ) use the Qt::ItemIsEditable
> I did not find the a unset flag hope somebody from qt answers this.
>
> One more trick is use setCellWidget() in QTableWidget to a QlineEdit and
> make the lineEdit as readonly.This way you can make some cells editable and
> some not.
>
> On Sun, Apr 5, 2009 at 1:44 PM, Miguel Cardenas <mfcardenas at gmail.com>wrote:
>
>> Hello list
>>
>> One question, is it possible to make read-only certain columns in a
>> QTableWidget? Didn't find something like this in the documentation...
>>
>> Thanks
>>
>> --
>> Miguel Cardenas
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>>
>
>
> --
> _/\_
> With Regards
> SB Angel Warrior
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
--
Miguel Cardenas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090405/6a1e21c1/attachment.html
More information about the Qt-interest-old
mailing list