Hello all,
i am porting a python application from qt3 to qt4 but i have some problem. Here is a minimal program showing the error i'm getting:

Qt Code:
  1. import sys,thread
  2. from PyQt4 import QtGui, QtCore
  3.  
  4. app = QtGui.QApplication(sys.argv)
  5. win = QtGui.QMainWindow()
  6. table = QtGui.QTableWidget(1, 2)
  7. win.setCentralWidget(table)
  8. def change_row_count():
  9. table.setRowCount(2)
  10. thread.start_new_thread(change_row_count, ())
  11. win.show()
  12. app.exec_()
To copy to clipboard, switch view to plain text mode 

and this is what i get (under linux):
$ python test.py
QObject::connect: Cannot queue arguments of type 'QModelIndex'
(Make sure 'QModelIndex' is registed using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QModelIndex'
(Make sure 'QModelIndex' is registed using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QModelIndex'
(Make sure 'QModelIndex' is registed using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QModelIndex'
(Make sure 'QModelIndex' is registed using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QModelIndex'
(Make sure 'QModelIndex' is registed using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QModelIndex'
(Make sure 'QModelIndex' is registed using qRegisterMetaType().)
QObject::connect: Cannot queue arguments of type 'QModelIndex'
(Make sure 'QModelIndex' is registed using qRegisterMetaType().)

changing rowCount in the main thread or commenting out setRowCount call in change_row_count() makes those errors disappear.

What's wrong?

Thanks in advance