[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] python3-qt5-5.5-1
From:       MM <finjulhich () gmail ! com>
Date:       2015-09-21 17:52:08
Message-ID: CADsB1iBomY6ji40WJJU0dktyy=cPS3K0dibct3j=A4q=z4FMVw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


The dataChanged signal has this c++ signature:

QAbstractItemModel::dataChanged(const QModelIndex & topLeft, const
QModelIndex & bottomRight, const QVector<int> & roles = QVector<int> ());

In pyqt, I try to emit the signal from my class that derives from
QAbstractTableModel, like so:

self.dataChanged.emit( index, index )

This fails with the following error:

QObject::connect: Cannot queue arguments of type 'QVector<int>'
(Make sure 'QVector<int>' is registered using qRegisterMetaType().)
This is related to this bug:
https://bugreports.qt.io/browse/QTBUG-46517

Specifying an explicit empty tuple or list for the last argument still
fails with the same error.

Therefore, I currently use self.modelReset.emit() which causes CPU overuse,
as I have realtime flow.

Is there a workaround to be able to emit for just the range that changed?

Tx

[Attachment #5 (text/html)]

<div dir="ltr"><div><span class="" style="white-space:pre">The dataChanged signal has this c++ \
signature:</span></div><div><span class="" style="white-space:pre"><br></span></div><span \
class="" style="white-space:pre">QAbstractItemModel::</span>dataChanged(const QModelIndex &amp; \
topLeft, const QModelIndex &amp; bottomRight, const QVector&lt;int&gt; &amp; roles = \
QVector&lt;int&gt; ());<br><div><br></div><div>In pyqt, I try to emit the signal from my class \
that derives from QAbstractTableModel, like so:</div><div><br></div><div>self.dataChanged.emit( \
index, index )</div><div><br></div><div>This fails with the following \
error:</div><div><br></div><div><span \
style="color:rgb(112,112,112);font-family:Arial,sans-serif;font-size:14px;line-height:20px">QObject::connect: \
Cannot queue arguments of type &#39;QVector&lt;int&gt;&#39;</span><br \
style="color:rgb(112,112,112);font-family:Arial,sans-serif;font-size:14px;line-height:20px"><span \
style="color:rgb(112,112,112);font-family:Arial,sans-serif;font-size:14px;line-height:20px">(Make \
sure &#39;QVector&lt;int&gt;&#39; is registered using \
qRegisterMetaType().)</span><br></div><div><span \
style="font-size:14px;line-height:20px;color:rgb(112,112,112);font-family:Arial,sans-serif">This \
is related to this bug:</span><br></div><div><font color="#707070" face="Arial, \
sans-serif"><span style="font-size:14px;line-height:20px"><a \
href="https://bugreports.qt.io/browse/QTBUG-46517">https://bugreports.qt.io/browse/QTBUG-46517</a></span><br></font></div><div><font \
color="#707070" face="Arial, sans-serif"><span \
style="font-size:14px;line-height:20px"><br></span></font></div><div><div>Specifying an \
explicit empty tuple or list for the last argument still fails with the same \
error.</div></div><div><br></div><div>Therefore, I currently use self.modelReset.emit() which \
causes CPU overuse, as I have realtime flow.</div><div><br></div><div>Is there a workaround to \
be able to emit for just the range that changed?</div><div><br></div><div>Tx</div></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic