When You compile and link your files using Qt Editor, Qt will create folder: C:\....\MyProject-build-desktop\debug
Inside this folder there will be MyProject.exe file.
You must copy into this folder some dll files.
You can find dll files here: c:\QtSDK\Desktop\Qt\4.7.3\mingw\bin\
Into debug folder You must copy 4 files that are needed by any Qt app. Those files are:
1. libgcc_s_dw2-1.dll
2. mingwm10.dll
3. QtGuid4.dll
4. QtCored4.dll
I'm not quite sure about next steps because I was doing this in earlier versions of Qt, but here is how I was doing it:
Copy this folder: c:\QtSDK\Desktop\Qt\4.7.3\mingw\plugins\sqldrivers \ into your debug folder(the folder that contains MyProject.exe file)
Just in case copy these dll files into your debug folder:
1. QtSqld4.dll
2. QtSql4.dll
(These two files location is c:\QtSDK\Desktop\Qt\4.7.3\mingw\bin\)
Edit your .pro file by adding this code: QT += core sql
Qt Code:
QT += core gui\
+= core sql //THIS IS WHAT YOU NEED TO ADD
TARGET = MyProject
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
.
.
.
QT += core gui\
+= core sql //THIS IS WHAT YOU NEED TO ADD
TARGET = MyProject
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp \
.
.
.
To copy to clipboard, switch view to plain text mode
Copy your debug folder to PC without installed Qt and run MyProject.exe file. If the problem persist after that notify me, and we shall see what to do next.
Bookmarks