[Qt-interest] QTableWidget: allow or deny selection
Paolino Marmolaro
paolino.marmolaro at gmail.com
Tue Mar 2 10:13:12 CET 2010
thanks Alex, but setFlags is not the best solution for me.
I'm looking for a "aboutToSelect" signal fired on QTableWidgetItem, so in
the slot method I can verify the condition to allow or not the selection.
2010/3/2 Malyushytsky, Alex <alex at wai.com>
> If you need to prevent QTableWidgetItem be selected you don't set
> ItemIsSelectable flag.
> Check void QTableWidgetItem::setFlags(Qt::ItemFlags flags);
>
> Hope this helps,
> Alex
>
> From: qt-interest-bounces at trolltech.com [mailto:
> qt-interest-bounces at trolltech.com] On Behalf Of Paolino Marmolaro
> Sent: Monday, March 01, 2010 2:49 PM
> To: Qt-interest at trolltech.com
> Subject: [Qt-interest] QTableWidget: allow or deny selection
>
> Hi,
>
> I need to allow or deny single cell selection depending on some conditions
> (e.g. the value in the cell).
>
> I'm using a QTableWidget without inheriting from it.
> Any suggestions?
>
>
>
>
>
>
> ---------------------------------------------------------------------------------------------------
> Weidlinger Associates, Inc. made the following annotations.
>
> "This message and any attachments are solely for the intended recipient and
> may contain confidential or privileged information. If you are not the
> intended recipient, any disclosure, copying, use, or distribution of the
> information included in this message and any attachments is prohibited. If
> you have received this communication in error, please notify us by reply
> e-mail and immediately and permanently delete this message and any
> attachments. Thank you."
>
> "Please consider our environment before printing this email."
>
> _______________________________________________
> 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/20100302/3dee8b83/attachment.html
More information about the Qt-interest-old
mailing list