Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Pyside + Mysql = driver not loaded
Forum Updated to NodeBB v4.3 + New Features

Pyside + Mysql = driver not loaded

Scheduled Pinned Locked Moved Language Bindings
8 Posts 5 Posters 8.9k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    dviguhix
    wrote on last edited by
    #1

    Hello.
    self.db = QSqlDatabase.addDatabase("QMYSQL")

    QSqlDatabase: QMYSQL driver not loaded
    QSqlDatabase: available drivers: QSQLITE QODBC3 QODBC QPSQL7 QPSQL

    How solve?

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      please use the tag on the top right of your screen. This has been asked a lot already. All solutions can be found "here":http://developer.qt.nokia.com/search/tag/mysql.

      I you have any specific questions after that feel free to ask here.

      Qt Certified Specialist
      www.edalsolutions.be

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dviguhix
        wrote on last edited by
        #3

        I find answer about qt+mysql, but not about pyside + mysql. I try copy libmysql.dll, in pyside directory, but it not work.

        1 Reply Last reply
        0
        • EddyE Offline
          EddyE Offline
          Eddy
          wrote on last edited by
          #4

          Did you have a look at "this page":http://developer.qt.nokia.com/wiki/Building_PySide?

          Did you compile it yourself or did you use an installer?
          What OS are you using?

          Qt Certified Specialist
          www.edalsolutions.be

          1 Reply Last reply
          0
          • L Offline
            L Offline
            loladiro
            wrote on last edited by
            #5

            PySide are the Qt bindings for python. Loading a plugin (like the mysql driver) should work the same way as it does with C++. "How to build the MySQL driver plugin":http://doc.qt.nokia.com/4.7/sql-driver.html#qmysql

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dviguhix
              wrote on last edited by
              #6

              I using windows and use installer.

              I try - http://doc.qt.nokia.com/4.7/sql-driver.html#qmysql

              @Now the following libraries are ready in C:\Qt\4.6.2\plugins\sqldrivers.
              libqsqlmysql4.a
              libqsqlmysqld4.a
              qsqlmysql4.dll
              qsqlmysqld4.dll

              To use the SDK and QtCreator directly, copy these libraries to your C:\Qt...\qt\plugins\sqldrivers, and copy C:\MySQL\MySQL51\lib\opt\libmysql.dll to your C:\Qt...\qt\bin.@

              I copy this files from C:\Qt\2010.05\qt\plugins\sqldrivers to pyside plugins\sqldrivers, but this not help.

              1 Reply Last reply
              0
              • E Offline
                E Offline
                ekoswibowo
                wrote on last edited by
                #7

                Currently I have the same problem. Any solution for this?

                1 Reply Last reply
                0
                • Q Offline
                  Q Offline
                  qtforet
                  wrote on last edited by
                  #8

                  Seems PySide only supports sqlite so far:
                  http://stackoverflow.com/a/15944463/1886357

                  Not sure where the documentation for this is.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved