[Qt-interest] signal and slot in QTreeView
ami guru
dosto.walla at gmail.com
Thu Dec 4 19:17:31 CET 2008
Hello ,
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')
*********************************
Here is the code snippet:
************************''
H3DMainWindow::H3DMainWindow(QMainWindow *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
///set up the model data
///read from the H3D node
///database
treeH3D = new TreeModel();
/*
insert the model in a view
*/
QTreeView *view = new QTreeView(ui.nodesDockWidget);
view->setModel(treeH3D);
ui.nodesDockWidget->setWidget(view);
connect(view,SIGNAL(clicked()),this,SLOT(showNodeName()));
************************'
Any Idea?
Sajjad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20081204/97359060/attachment.html
More information about the Qt-interest-old
mailing list