2013-05-10 38 views
0

我在23:59:59時收到以下消息傳遞給第二天。 我不知道(因爲代碼是由其他人編寫的)它來自哪裏。 任何人都可以建議如何找出問題? 謝謝!QObject連接:無法排隊'QItemSelection'類型的參數

QObject::connect: Cannot queue arguments of type 'QItemSelection' 
(Make sure 'QItemSelection' is registered using qRegisterMetaType().) 
QObject::connect: Cannot queue arguments of type 'QItemSelection' 
(Make sure 'QItemSelection' is registered using qRegisterMetaType().) 
QObject::connect: Cannot queue arguments of type 'QItemSelection' 
(Make sure 'QItemSelection' is registered using qRegisterMetaType().) 

回答

4

使用一個命名空間的下列之外:

Q_DECLARE_METATYPE(namespace::QItemSelection) 

Documentation

+0

這可能有,如qRegisterMetaType()不會,否則編譯。我想這是qRegisterMetaType()調用本身缺少的。執行qRegisterMetaType ();在它被使用之前,例如,在main()之上。 – 2013-05-10 06:19:41

相關問題