Qsqldatabase Qpsql Driver Not Loaded

Posted : admin On 18.05.2020
Qsqldatabase Qpsql Driver Not Loaded Average ratng: 3,5/5 6391 votes
  1. Qsqldatabase Qpsql Driver Not Loaded Free
  2. Qsqlite Driver Not Loaded
  3. Qsqldatabase Example
  4. Qsqldatabase Qpsql Driver Not Loaded On Iphone
  5. Qsqldatabase Qmysql Driver Not Loaded
  6. Qsqldatabase Qpsql Driver Not Loaded Ubuntu
Active2 years, 1 month ago
Not

Qsqldatabase Qpsql Driver Not Loaded Free

I've just done developing a QT CRUD Application. I am using SQLite to store the information locally in my disk where the application is running. This way my application works fine.

But the app lack the the a central database server. Therefor, I started by installing MySql-server and MySql-workbench. I imported my DB in the workbench and made sure the server is running.

Sep 29, 2019  QSqlDatabase: QMYSQL3 driver not loaded QSqlDatabase: available drivers: QSQLITE QMYSQL QMYSQL3 QODBC QODBC3 QPSQL QPSQL7 Il semblerait que le load du driver ne puisse se faire. Faut-il adapter un PATH pour XUBUNTU ou pour QT ou. Jun 13, 2018  I have the following code that produces these results: ('QSQLITE', 'QMYSQL', 'QMYSQL3') QSqlDatabase: QMYSQL driver not loaded QSqlDatabase: available drivers: Stack Overflow. Log In Sign Up. QMYSQL driver available but not loaded. Available drivers: QSQLITE QODBC QODBC3 QPSQL QPSQL7. Qt5.2 can find the mysql driver but can not load.

Now on Qt, I wrote the following lines to conenct to my server on the 'localhost ' using port '3306' as follow:

However, I get the following error on QT 'Application Outout ':

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

I tried to make sure that libmysql.dll is located in 'C:Program FilesMySQLMySQL Server 5.7lib' .

I copied it also to 'C:UsersAbubakrDocumentsGitHubDEBUGbuild-Muwassa-Desktop_Qt_5_4_2_MinGW_32bit2-debug'

but it is not working at all.

Please help !!

McLan
McLanMcLan
1,2866 gold badges30 silver badges59 bronze badges

1 Answer

You need to build the QMYSQL driver by yourself first.

Qsqlite Driver Not Loaded

When you download Qt you have also the source that are provided with it.

Qsqldatabase Example

In my case, it is in : C:Qt5.9SrcqtbasesrcpluginssqldriversmysqlHere you have a *.pro (that is a kind of makefile generator). You just have to open it with QtCreator, Compile it and you will get a dll. This dll is the MySQL driver and must be in the same dirent of your application.

To do that, if you have a problem with the compilation (like mysql.h not found), you must 'install' mysql library also.

In Linux you can have the same issue as well.

Antoine MorrierAntoine Morrier

Not the answer you're looking for? Browse other questions tagged c++mysqlqtsqlite or ask your own question.

Active9 months ago

I have some trouble when I want to add a database.

After calling this method I have an error:

I include to PATH variable paths to:

Also I copy folder sqldrivers to Debug folder. Also tried to copy dlls drom this folder to Debug. Doesn't work either.

bin-binbin-bin

Qsqldatabase Qpsql Driver Not Loaded On Iphone

3192 gold badges4 silver badges14 bronze badges

4 Answers

I came here googling because I had the same problem in Windows.

In my case to solve the issue I had to install PostgreSQL for Windows 32 bits since my Qt target was MinGW 32 bits.

Additionally, I had to add the PATH to the PostgreSQL bin and lib directories so Qt could find the right .dlls.

The PATH can be set before launching Qt Creator or using the Qt Creator itself via the Build Environment in the Projects pane.

TarodTarod
4,5265 gold badges29 silver badges40 bronze badges
Not

Add the system variable QT_DEBUG_PLUGINS=1 if you want to get full information of why the QPSQL driver has not been loaded.

Probably you will discover that Qt is not able to find it. Copy and paste the output here to know what exactly happens.

Tarod

Qsqldatabase Qmysql Driver Not Loaded

4,5265 gold badges29 silver badges40 bronze badges
Antonio BorondoAntonio Borondo

Use depends.exe on qsqlpsql.dll and found that this dll need libpq.dll from PostgreSQL9.3libfolder. Add libpq.dll to Debug folder and it works:)

bin-binbin-bin
3192 gold badges4 silver badges14 bronze badges

Try pip install PyQt5 event if you already installed it using conda or installer. Dazzle video creator software. It helped me.

Dijkgraaf
7,73010 gold badges29 silver badges47 bronze badges
user10807076user10807076

Qsqldatabase Qpsql Driver Not Loaded Ubuntu

Not the answer you're looking for? Browse other questions tagged c++qtpostgresqlqsqldatabase or ask your own question.