[PyQt] problems to use QTableView

Daniel Krause madakr at web.de
Thu May 19 05:21:03 BST 2016


Thanks Vincent and David, that works for me!

2016-05-18 22:04 GMT+02:00 Vincent Vande Vyvre <
vincent.vande.vyvre at telenet.be>:

> Le 18/05/2016 21:32, Daniel Krause a écrit :
>
> Hello,
>
> I have some problems to understand how to use QTableView.
>
> When I run this code
>
> if __name__ == '__main__':
>     import pandas
>     from PyQt5 import QtCore
>     from PyQt5.QtWidgets import QTableView
>     from PyQt5.QtGui import QGuiApplication
>     import sys
>
>     print('initialize app')
>     application = QGuiApplication(sys.argv)
>     print('initialize view')
>     view = QTableView()
>     print(view)
>     print('do something else')
>
>
> the execution of the script stops before
>
>     print(view)
>     print('do something else')
>
>
> What am I missing?
>
> Thanks for any hints,
> Daniel
>
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.comhttps://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
> I don't know anything with QtGui.QGuiQApplication but try with
> QtWidgets.QApplication
>
> import sys
> from PyQt5.QtWidgets import QApplication, QTableView
> app = QApplication([])
> view = QTableView()
> view.show()
> sys.exit(app.exec_())
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160519/7473c181/attachment.html>


More information about the PyQt mailing list