Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    PySide - Interacting with SQLite through Qt vs. native Python?

    Language Bindings
    2
    2
    1394
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Alabaster last edited by

      I have been working with Python and PySide for a while but I'm fairly inexperienced with databases. (So far I've been able to accomplish what I need using Pickle).

      I'm looking to take the plunge starting with SQLite and I'm wondering whether I should interact with SQLite through Python's native bindings, or through Qt?

      Are there pros and cons for each? Different use cases in which one would be the preferred option?

      In the end I'll learn to work both ways. But for now I'm wondering where I should start (and why, if you have a moment to explain).

      Thanks

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        It really all depends on how you are going to use the database. If you are planning to use Qt's Model/View paradigm then using the QtSql module would be the logical choice. However you could also implement your own model using python's sql.

        You should start by looking at your requirements. Then if both qualifies, just try each to see which one fits your needs better.

        Hope it helps

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • First post
          Last post