[PyQt] [PYQT5]display sqlite data in Qtableview Python

Florian Bruhin me at the-compiler.org
Tue Jul 24 12:40:07 BST 2018

On Tue, Jul 24, 2018 at 01:54:13PM +0430, Maziar Parsijani wrote:
> PYQT5 examples for sqlite and QSqlTableModel are not for reading sqlite
> database  and show them in QSqlTableModel.
> I want to read my database rows and columns and show them in
> QSqlTableModel.Are there any good examples for such thing ?

The examples just use an in-memory database
("db.setDatabaseName(':memory:')" in connection.py). If you instead pass
a filename to a sqlite database, it'll read that database.


https://www.qutebrowser.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | https://the-compiler.org/pubkey.asc
         I love long mails! | https://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180724/504e4b3d/attachment.sig>

More information about the PyQt mailing list