forked from blue/squawk
just proxying button event from feed view delegate to the feed model
This commit is contained in:
parent
b3c6860e25
commit
ebe5addfb5
6 changed files with 62 additions and 2 deletions
|
@ -253,6 +253,7 @@ QPushButton * MessageDelegate::getButton(const Models::FeedItem& data) const
|
|||
result->download = false;
|
||||
}
|
||||
buttons->insert(std::make_pair(data.id, result));
|
||||
connect(result, &QPushButton::clicked, this, &MessageDelegate::onButtonPushed);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -285,6 +286,11 @@ void MessageDelegate::endClearWidgets()
|
|||
}
|
||||
}
|
||||
|
||||
void MessageDelegate::onButtonPushed() const
|
||||
{
|
||||
FeedButton* btn = static_cast<FeedButton*>(sender());
|
||||
emit buttonPushed(btn->messageId, btn->download);
|
||||
}
|
||||
|
||||
// void MessageDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const
|
||||
// {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue