##// END OF EJS Templates
Copy database to bin directory
Marek Rosa -
r242:2883e9a758d6
parent child
Show More
@@ -21,3 +21,11 SOURCES += main.cpp\
21 widget.cpp
21 widget.cpp
22
22
23 HEADERS += widget.h
23 HEADERS += widget.h
24
25 COPY_DATABASE_COMMAND = "cp gdpData $$CHART_BUILD_BIN_DIR/gdpData"
26
27 win32:{
28 COPY_DATABASE_COMMAND = $$replace(COPY_DATABASE_COMMAND, "/","\\")
29 }
30
31 QMAKE_POST_LINK = $$COPY_DATABASE_COMMAND
@@ -22,7 +22,7 QTCOMMERCIALCHART_USE_NAMESPACE
22 Widget::Widget(QWidget *parent)
22 Widget::Widget(QWidget *parent)
23 : QWidget(parent)
23 : QWidget(parent)
24 {
24 {
25 setGeometry(100, 100, 800, 600);
25 setGeometry(100, 100, 1000, 600);
26
26
27 // right panel layout
27 // right panel layout
28 countrieslist = new QListWidget;
28 countrieslist = new QListWidget;
@@ -54,7 +54,7 Widget::Widget(QWidget *parent)
54
54
55 // connect to the database
55 // connect to the database
56 db = QSqlDatabase::addDatabase("QSQLITE");
56 db = QSqlDatabase::addDatabase("QSQLITE");
57 db.setDatabaseName("../example/gdpbarchart/gdpData");
57 db.setDatabaseName("gdpData");
58 if(!db.open())
58 if(!db.open())
59 {
59 {
60 qDebug() << "could not open database. SQLite db file missing (?)";
60 qDebug() << "could not open database. SQLite db file missing (?)";
General Comments 0
You need to be logged in to leave comments. Login now