[PyQt] problems to use QTableView
Vincent Vande Vyvre
vincent.vande.vyvre at telenet.be
Wed May 18 21:04:24 BST 2016
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.com
> https://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_())
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160518/b5c7699a/attachment-0001.html>
More information about the PyQt
mailing list