[Qt-interest] Fwd: signal and slot in QTreeView

ami guru dosto.walla at gmail.com
Fri Dec 5 00:13:01 CET 2008


Hello Arnold

thanks for the hint.

Could not make much out of it though.

I want to show the property value in the Mesage Box when  the user click any
of the tree item.

Sajjad

---------- Forwarded message ----------
From: Arnold Krille <arnold at arnoldarts.de>
Date: Thu, Dec 4, 2008 at 7:37 PM
Subject: Re: [Qt-interest] signal and slot in QTreeView
To: qt-interest at trolltech.com


Hi,

On Thursday 04 December 2008 19:17:31 ami guru wrote:
> I have some item arranged in a tree view and i m trying to implement the
> signal and slot
> mechanism for that.
> Clicked() signal is inherited from the abstractitemview class but i cannot
> make that functional
> *******************************
> Object::connect: No such signal QTreeView::clicked()
> Object::connect:  (receiver name: 'MainWindow')
> *********************************

As Qt tells you, there is no clicked() signal in QTreeView or any of its
inherited classes. And what would you know from that signal? Only that the
user clicked somewhere in the widget? How useless.
You are probably searching for QAbstractItemView::clicked( const
QModelIndex&
) or for QAbstractItemView::activated( const QModelIndex& )... These two
have
the advantage that they already give you the item that was clicked on, so
you
don't have to determine that yourself.

Have fun,

Arnold
_______________________________________________
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/20081205/557fd08c/attachment.html 


More information about the Qt-interest-old mailing list