PyQt error: No such signal QObject::dataChanged
- by DSblizzard
PyQt application works fine, but when I close it Python shows this message:
"Object::connect: No such signal QObject::dataChanged(QModelIndex,QModelIndex)"
What is the cause of this? There isn't dataChanged signal in the program.
EDIT:
Almost minimal program which causes error:
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtSql import *
import ui_DBMainWindow
global Mw, Table, Tv
Id, Name, Size = range(3)
class TTable():
pass
Table = TTable()
class TMainWindow(QMainWindow, ui_DBMainWindow.Ui_MainWindow):
def __init__(self, parent = None):
global Table
QMainWindow.__init__(self, parent)
self.setupUi(self)
self.showMaximized()
self.mapper = QDataWidgetMapper(self)
self.mapper.setModel(Table.Model)
def main():
global Mw, Table, Tv
QApp = QApplication(sys.argv)
DB = QSqlDatabase.addDatabase("QSQLITE")
DB.setDatabaseName("1.db")
Table.Model = QSqlTableModel()
Table.Model.setTable("MainTable")
Table.Model.select()
Mw = TMainWindow()
QApp.exec_()
if __name__ == "__main__":
main()