Change code structure.

Now we use sqlite code directly not by library so you need not compile the
library first.
Update for Qt5.