Keep invite hit testing in the message presenter and show link cursor
This commit is contained in:
1 parent
8574299ab3
commit
c0ee38cb43
3 files changed
+10
-3
No files matched your search
@@ -421,6 +421,10 @@ MessageList::MessageList(DbManager* db, AudioRecorder* recorder, QWidget *parent
|
||||
|
||||
m_view->setModel(m_model);
|
||||
auto* msgDelegate = new MessageDelegate(this);
|
||||
m_view->setInviteHitTest([this, msgDelegate](const QModelIndex& index, const QPoint& point) {
|
||||
QStyleOptionViewItem option; option.initFrom(m_view); option.widget = m_view; option.rect = m_view->visualRect(index);
|
||||
return msgDelegate->inviteLinkAt(option, index, point);
|
||||
});
|
||||
msgDelegate->setVideoOpenCallback([this](const QString& path) {
|
||||
emit openVideoRequested(path);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user