[Qt-interest] QTableWidget icon/check state and grid on/off issues

Santhosh Y santhosh at softjin.com
Mon Jun 1 09:14:00 CEST 2009


Hi,

In QTableWidget, I would like to set a cell with a QIcon or QCheckState.

I am doing the following:

// For showing an icon in a Table cell
QTableWidgetItem* cell1 = QTableWidgetItem ();
cell1->setIcon(QIcon(":/collapsed.png"));

// For showing a check box in a Table Cell
QTableWidgetItem* cell2 = QTableWidgetItem ();
cell2->setCheckState(Qt::Checked);

In the above 2-cases, inside the cell there is a space after 
icon//check-state, where I can still enter the text.

Can I avoid this. User should not be allowed to enter anything in the 
above 2-cells.
Is this possible?

And in the cell2 scenario, can I avoid drawing the check-box boundaries?

------------------
Issue2:
In TableWidget can I draw one row with grid on and the next row with 
grid off.
Is this possible.



-- 
----------------------------------------------------
Y Santhosh Kumar
Senior Software Engineer
SoftJin Technologies Private Limited
Unit No. 102, Mobius Tower,
I Floor, SJR I - Park,
EPIP, White Field,
Bangalore - 560066, India
U : www.softjin.com
E : santhosh at softjin.com
T : +91-80-41779999
M : +91-9740535265
----------------------------------------------------



Business Disclaimer
____________________________________________________________
This e-mail message and any files transmitted with it are intended solely
for  the use  of the  individual or entity  to which they  are  addressed. It
may  contain confidential,  proprietary or legally  privileged  information.
If  you  are  not  the  intended recipient please be advised that you have
received  this  message in error and any use is strictly prohibited. Please
immediately  delete it  and all copies of it from your system, destroy any
hard  copies  of  it and  notify  the  sender  by return mail. You must not,
directly or indirectly, use,  disclose,  distribute, print, or copy any part of
this message if you are not the intended recipient.
___________________________________________________________





More information about the Qt-interest-old mailing list