Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
logicxd authored Oct 29, 2016
1 parent 5f77ece commit 5bc79d7
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@

This repository is a small example of how to set up sqlite database with Qt and perform some basic queries.

# Requirements
- QtSql drivers installed: QSQLITE
- sqlite database created:
* 1. $ sqlite3 people.db
* 2. sqilte> CREATE TABLE people(ids integer primary key, name text);
* 3. sqlite> .quit
# Instructions
1. Install [SQLITE](https://www.sqlite.org)
2. Download this Github repository
3. Run in QT Creator and watch it connect to the database.

Visit the main article [here](https://katecpp.wordpress.com/2015/08/28/sqlite-with-qt/) to understand more.

**IMPORTANT** If you don't see your database file show up in your file directory, you need to go to Projects -> Build & Run -> Run -> Working Directory. This is where your database file will be generated.

---

## Update History

Updated October 29, 2016
* Added a function to create tables, which will also automatically create a new database if it doesn't already exist.

0 comments on commit 5bc79d7

Please sign in to comment.