Sinis
2011-03-03 10:15:29 UTC
Thanks for your explanation.
But i have a litter puzzled, my ListCellCreator inherits MAbstractCellCreator<MContentItem> and create widget MContentItem,
MContentItem have a "clicked()" signal, however, i still fail to emit an "itemClicked" signal. When i clicked mlist,
i can received a "clicked()" signal from some MContentItem instead of an "itemClicked" signal from mlist.
------------------ ÔÊŒÓÊŒþ ------------------
·¢ŒþÈË: "stanislav.ionascu"<***@nokia.com>;
·¢ËÍʱŒä: 2011Äê3ÔÂ3ÈÕ(ÐÇÆÚËÄ) ÏÂÎç5:50
ÊÕŒþÈË: "ext Sinis"<***@foxmail.com>;
³ËÍ: "meego-touch-dev"<meego-touch-***@meego.com>;
Ö÷Ìâ: Re: [MeeGo-touch-dev] problem about signal itemClicked in MLIST
Hi,
For MList to emit an itemClicked signal, your widgets, which are created
in ListCellCreator, must have a "clicked()" signal.
The itemClicked signals for the headers will not be emitted.
Best Regards,
Stanislav Ionascu.
But i have a litter puzzled, my ListCellCreator inherits MAbstractCellCreator<MContentItem> and create widget MContentItem,
MContentItem have a "clicked()" signal, however, i still fail to emit an "itemClicked" signal. When i clicked mlist,
i can received a "clicked()" signal from some MContentItem instead of an "itemClicked" signal from mlist.
------------------ ÔÊŒÓÊŒþ ------------------
·¢ŒþÈË: "stanislav.ionascu"<***@nokia.com>;
·¢ËÍʱŒä: 2011Äê3ÔÂ3ÈÕ(ÐÇÆÚËÄ) ÏÂÎç5:50
ÊÕŒþÈË: "ext Sinis"<***@foxmail.com>;
³ËÍ: "meego-touch-dev"<meego-touch-***@meego.com>;
Ö÷Ìâ: Re: [MeeGo-touch-dev] problem about signal itemClicked in MLIST
Hi,
For MList to emit an itemClicked signal, your widgets, which are created
in ListCellCreator, must have a "clicked()" signal.
The itemClicked signals for the headers will not be emitted.
Best Regards,
Stanislav Ionascu.
When i clicked mlist, i find out the signal itemClicked(const
QModelIndex &) would not be emitted.
...
MList * list = new MList;
list->setShowGroup(true);
ListCellCreator * cellCreator = new ListCellCreator ;
list->setCellCreator(cellCreator);
HeaderCellCreator * headerCreator = new HeaderCellCreator ;
list->setHeaderCreator(headerCreator);
list->setModel(model);
connect(list, SIGNAL(itemClicked(const QModelIndex &), this,
SLOT(clickItem(const QModelIndex &)));
...
i code like this, after doing test, when i clicked mlist,
i find signal itemClicked(const QModelIndex &) will not be emitted,
but the signal in widgets created by ListCellCreator
or HeaderCellCreator can be emitted,
what should i do to get the signal emitted by Mlist instead of
widgets from ListCellCreator or HeaderCellCreator.
Any suggestions are greatly appreciated
Thanks
_______________________________________________
MeeGo-touch-dev mailing list
http://lists.meego.com/listinfo/meego-touch-dev
QModelIndex &) would not be emitted.
...
MList * list = new MList;
list->setShowGroup(true);
ListCellCreator * cellCreator = new ListCellCreator ;
list->setCellCreator(cellCreator);
HeaderCellCreator * headerCreator = new HeaderCellCreator ;
list->setHeaderCreator(headerCreator);
list->setModel(model);
connect(list, SIGNAL(itemClicked(const QModelIndex &), this,
SLOT(clickItem(const QModelIndex &)));
...
i code like this, after doing test, when i clicked mlist,
i find signal itemClicked(const QModelIndex &) will not be emitted,
but the signal in widgets created by ListCellCreator
or HeaderCellCreator can be emitted,
what should i do to get the signal emitted by Mlist instead of
widgets from ListCellCreator or HeaderCellCreator.
Any suggestions are greatly appreciated
Thanks
_______________________________________________
MeeGo-touch-dev mailing list
http://lists.meego.com/listinfo/meego-touch-dev