Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, February 2007
QTable - elements readonly / changeable ?


Message 1 in thread

Hi

I am working with QT 3.3.4
I am playing with qtable. I found the table can be made readonly as a 
whole by setting "readonly"-Property to TRUE.

When I then try to set an individual row to non-readonly by using

qtable->setRowReadOnly( FALSE ) ;

this does not work. On the other hand:

When I set the table as a whole to READONLY = TRUE in the 
property-editor - I cannot set individual rows to "readonly = false" and 
vice versa.

I know there is a qicstable, but that only works with Qt 4.xx - and I 
cannot switch to the new version of Qt up to now.

Is there a workaroung for my problem?

Tia
Jörg

--
 [ signature omitted ] 

Message 2 in thread

You cannot upgrade to 4.x, but can you at least upgrade to the latest 3.3.x?
Especially 3.3.4 has some nasty bugs.

> Is there a workaroung for my problem?

There is always a workaround. Just don't set your table globally read-only, but each row 
individually. ;-)

Something like that:

for(i = 0; i< numCols(); ++i)
	setColumnReadOnly(i,true);
setColumnReadOnly(<one and only exception>,false);

Maybe not nice, maybe not elegant, but you wanted a workaround.

Guido


--
 [ signature omitted ]