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

Maziar Parsijani maziar.parsijani at gmail.com
Tue Jul 24 10:24:13 BST 2018


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 ?

On Sun, Jul 22, 2018 at 12:22 PM, Florian Bruhin <me at the-compiler.org>
wrote:

> Hi,
>
> Please include the mailinglist on replies. You should have some
> functionality like "reply to all" in your mail client. I re-added it
> again.
>
> On Sun, Jul 22, 2018 at 11:12:06AM +0430, Maziar Parsijani wrote:
> > Thats right but I searched a lot and I didnt find an example for such
> thing
> > in python.as you said I converted my data from xlsx to sqlite and I can
> > read from it and I know how to use it to put my data in qtablewidget. but
> > this widgets are slow for huge data I have to use qtableview and there
> are
> > no good example for such use in python.
>
> Well, I just told you to where to find such examples:
>
> > There are examples in examples/sql/ in the PyQt source
>
> There are examples there which use a QSqlConnection to sqlite, with a
> QSqlTableModel and a QTableView.
>
> If you think those examples aren't helpful, you'll need to be more
> specific on why and what you need exactly...
>
> Florian
>
> --
> 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 --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180724/d80184fe/attachment-0001.html>


More information about the PyQt mailing list