yes print add newlines at the end of every print statement, i use very much print to debug inside this application.
def eventFilter(self, object, event):
print event.type()
in _init_ function i install the eventfilter with:
self.operacionesPendientesListWidget.installEventFilter(self)
def eventFilter(self, object, event):
print event.type()
return QMainWindow.eventFilter(self, object, event)
in _init_ function i install the eventfilter with:
self.operacionesPendientesListWidget.installEventFilter(self)
To copy to clipboard, switch view to plain text mode
it prints this events:
when i mouseover: 129
when i left the widget: 12, 77, 12, 25, 9
when i doubleclick or click i get no signal.
i have found a detail, i get the signals when i enter in the toolbox but i am filtering listwidget, can be the problem that toolbox intercepts the mouse events? but i can select items and move between them with cursors ¿?
the way i create the items:
def dejarPendiente(self, codigoCliente, numeroIdentificador):
hora
= QTime().
currentTime().
toString(FORMATO_HORA
) if self.sender() == self.ventaWidget:
item
= QListWidgetItem(QIcon(":/images/pantalla_ventas.png"), self.
tr("%1 %2").
arg(codigoCliente
).
arg(hora
)) item.
setData(Qt.
UserRole,
QVariant(numeroIdentificador
)) self.operacionesPendientesListWidget.insertItem(0, item)
def dejarPendiente(self, codigoCliente, numeroIdentificador):
hora = QTime().currentTime().toString(FORMATO_HORA)
if self.sender() == self.ventaWidget:
item = QListWidgetItem(QIcon(":/images/pantalla_ventas.png"), self.tr("%1 %2").arg(codigoCliente).arg(hora))
item.setData(Qt.UserRole, QVariant(numeroIdentificador))
self.operacionesPendientesListWidget.insertItem(0, item)
To copy to clipboard, switch view to plain text mode
Bookmarks