Qt 4.5 - how do I perform a queued connection with

2019-04-14 06:15发布

I am trying to do a connect with a std::vector<FrameData*>& using queued connection

   connect(this, SIGNAL(process(QVector<FrameData*>&)), 
           this, SLOT(beginProcess(QVector<FrameData*>&),
           Qt::ConnectionType::QueuedConnection);

What parameters should I pass for QRegisterMetaType for this to work?

Thanks in advance!

标签: qt qt4
2条回答
老娘就宠你
2楼-- · 2019-04-14 06:42

You can't use non-const references in signals and slots.

EDIT: ...when using Queued connections.

查看更多
戒情不戒烟
3楼-- · 2019-04-14 06:58

std::vector or QVector? presumably the following should work,

int type = qRegisterMetaType< QVector<FrameData*> >("QVector<FrameData*>");

查看更多
登录 后发表回答