[Qt-interest] [QtS60-feedback] how to get the selection change event for listview in Qt

Ramesh ramesh.bs at robosoftin.com
Thu Mar 18 15:10:29 CET 2010


Hi,

Now one problem is solved, but it seems that I am stuck in small problem
some were
I have got the way to take the selectionitemchanged and currentitemchanged.

I have understand like this, but not sure it may be wrong, please correct if
I am wrong.

Currentitemchage takes place when the userclicks on the cell or when the
item updated?

And I want to get both the previous and	current item, only when the user
clicked on item. But if I do movement of keyboard also I am facing the
Same problem, that is I am getting current item change..

So how to avoide keyboard events to come to currentitemchange?


-----Original Message-----
From: qts60-feedback-bounces at trolltech.com
[mailto:qts60-feedback-bounces at trolltech.com] On Behalf Of Ramesh
Sent: Thursday, March 18, 2010 6:51 PM
To: liang.qi at nokia.com; qts60-feedback at trolltech.com
Subject: RE: [QtS60-feedback] how to get the selection change event for
listview in Qt

Thanks ill look into it

-----Original Message-----
From: qts60-feedback-bounces at trolltech.com
[mailto:qts60-feedback-bounces at trolltech.com] On Behalf Of
liang.qi at nokia.com
Sent: Thursday, March 18, 2010 6:06 PM
To: qts60-feedback at trolltech.com
Subject: RE: [QtS60-feedback] how to get the selection change event for
listview in Qt

Hi, 

The "current item" and "selected item" are different concepts in Qt. Please
have a look at this doc:
http://doc.qt.nokia.com/4.6/model-view-selection.html

The keyboard navigation only changes "current item", not "selected item". If
you need that feature, I think you need write your own code to update
"selected item" when you change the "current item".

Regards,
Liang

-----Original Message-----
From: qts60-feedback-bounces at trolltech.com
[mailto:qts60-feedback-bounces at trolltech.com] On Behalf Of ext Ramesh
Sent: Thursday, March 18, 2010 1:17 PM
To: 'Alessandro Portale'; qts60-feedback at trolltech.com
Subject: RE: [QtS60-feedback] how to get the selection change event for
listview in Qt

HI,
I found solution.. thanks
As you said I have used this signal QItemSelectionModel::selectionChanged

But when the item is clicked I am getting signal.. but when I change the
selection through keyboar I am not getting signal
Why so?

-----Original Message-----
From: qts60-feedback-bounces at trolltech.com
[mailto:qts60-feedback-bounces at trolltech.com] On Behalf Of Alessandro
Portale
Sent: Thursday, March 18, 2010 5:20 PM
To: qts60-feedback at trolltech.com
Subject: Re: [QtS60-feedback] how to get the selection change event for
listview in Qt

Hi,

QItemSelectionModel::selectionChanged is a signal. Did you connect it to a
slot in your code? That would be the correct way.

It is not an 'event' in the classical sense. Event function names in Qt
would usually have a "Event" at the end, and you can intercept those events
by overriding those functions in the derived class.

Alessandro

On 3/18/2010 11:48 AM, Ramesh wrote:
> How to get the selection change event.. can any one give me the simple
> code which reive the selection change event
-- 
List archive and information: http://trolltech.com/%(listname)s/

-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an
intended recipient, please notify the sender and delete all copies. Emails
to and from our network may be logged and monitored. This email and its
attachments are scanned for virus by our scanners and are believed to be
safe. However, no warranty is given that this email is free of malicious
content or virus.
-- 
List archive and information: http://trolltech.com/%(listname)s/
-- 
List archive and information: http://trolltech.com/%(listname)s/

-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an
intended recipient, please notify the sender and delete all copies. Emails
to and from our network may be logged and monitored. This email and its
attachments are scanned for virus by our scanners and are believed to be
safe. However, no warranty is given that this email is free of malicious
content or virus.
-- 
List archive and information: http://trolltech.com/%(listname)s/

-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.



More information about the Qt-interest-old mailing list