PyQt error: No such signal QObject::dataChanged
Posted
by DSblizzard
on Stack Overflow
See other posts from Stack Overflow
or by DSblizzard
Published on 2010-03-26T10:58:59Z
Indexed on
2010/03/28
3:13 UTC
Read the original article
Hit count: 661
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()
© Stack Overflow or respective owner