Cannot build project with qxt lib
-
Hello!
I'm tried to install qxt lib like "this":http://qt-project.org/wiki/LibQxt_in_QtCreator
but, when i tried include 1 lib to my project, namely QxtCsvModel.
I had some troubles.
MinGW32 cannot compile my project.
From QxtCsvModel i tried to use to start only
@QxtCsvModel *m_pCsvModel = new QxtCsvModel(this);@
but I had some link errors.Later I tried to install qxt with another method:
@configure -static -release
mingw32-make -j3
mingw32-make install -j3@@configure -debug
mingw32-make -j3
mingw32-make install -j3@and wrote in my .pro file this:
@CONFIG += qxt
QXT += core gu@
QT didn't see libs from qxt.Help me please!
-
Yep, I've all .lib & .dll there. I set the path only to bin directory.
I tried include lib and dll with help of this code:
@win32:CONFIG(release, debug|release): LIBS += -LD:/Developmentt/Qt/libqxt/lib/ -lqxtcore
else:win32:CONFIG(debug, debug|release): LIBS += -LD:/Developmentt/Qt/libqxt/lib/ -lqxtcoreINCLUDEPATH += D:/Developmentt/Qt/libqxt/src/core
DEPENDPATH += D:/Developmentt/Qt/libqxt/src/core@or with help of this code:
@CONFIG += qxt
QXT += core gui
QXT_DIR = D:/Developmentt/Qt/libqxt
LIBS += -L$${QXT_DIR}/lib
INCLUDEPATH += -L$${QXT_DIR}/include
DEPENDPATH += -L$${QXT_DIR}/include@
P.S: 1th variant it's without mingw32-make install -j3 (where 3 it's count core +1)@ -
.pro:
@CONFIG += QXT
QXT += core gui
QT += core guigreaterThan(QT_MAJOR_VERSION, 4){
QT += widgets
QXT += widgets
}TARGET = CSVReader
TEMPLATE = appSOURCES += main.cpp
mainwindow.cpp
csvreader.cppHEADERS += mainwindow.h
csvreader.hQXT_DIR = D:\Development\Qt\Qxt0.7.0
win32:CONFIG(release, debug|release): LIBS += -L$${QXT_DIR}\lib\ -lqxtcore
else:win32:CONFIG(debug, debug|release): LIBS += -L$${QXT_DIR}\lib\ -lqxtcoreINCLUDEPATH += $${QXT_DIR}\include\QxtCore
DEPENDPATH += $${QXT_DIR}\include\QxtCore@.h:
@#ifndef CSVREADER_H
#define CSVREADER_H#include <QWidget>
#include <QxtCsvModel>class QTableView;
class CSVReader : public QWidget
{
Q_OBJECT
public:
explicit CSVReader(QWidget *parent = 0);signals:
public slots:
void openCsv(const QString &filename);
void saveCsv(const QString &filename);
private:
QxtCsvModel *m_pCsvModel;
QTableView *m_ptblCsv;
};#endif // CSVREADER_H
@.cpp:
@#include "csvreader.h"#include <QTableView>
CSVReader::CSVReader(QWidget *parent) :
QWidget(parent)
{
m_pCsvModel = new QxtCsvModel(this);
m_ptblCsv = new QTableView(this);
}void CSVReader::openCsv(const QString &filename)
{
m_pCsvModel->setSource(filename);
}void CSVReader::saveCsv(const QString &filename)
{
m_pCsvModel->toCSV(filename);
}
@"error list:":http://oi60.tinypic.com/16az47t.jpg
-
-
-
If you start it via the explorer or debugging with QtCreator? If you start it from the explorer or command prompt the path to the qt-dlls is not set. You can set the path or copy the dll-files you need to the same directory where your exe-file is located.