PDA

View Full Version : QTableWidget + cellChanged(...)



losiem
8th November 2008, 18:05
Hi

How can I determine the the two situations:
- the content of QTableWidgetItem is changed from the code;
- the content of QTableWidgetItem is changed by the user;

I both situations I got cellChanged(int,int) signal.
I want to get that signal only when user is changing the content by editing the item.

I'm using QT 4.4.0.

thx

Ryszard

h123
9th November 2008, 06:33
> I both situations I got cellChanged(int,int) signal.
> I want to get that signal only when user is changing the content by editing the item.

You can use the 'notify' mechanism.
When it calls the cellchanged() programmatically set notify flag to false, else let it be true.

Hope it will help.

losiem
9th November 2008, 08:02
I made that mechanism already.
But this is so uncomfortable.

Really not exist any special signal emmited after user editing the item ?
Some kind of 'EndEdit' ?

thx
Ryszard

>> I both situations I got cellChanged(int,int) signal.
>> I want to get that signal only when user is changing the content by editing the item.

>You can use the 'notify' mechanism.
>When it calls the cellchanged() programmatically set notify flag to false, else let it be true.

>Hope it will help.