Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6357573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:11:32+00:00 2026-05-24T23:11:32+00:00

I’m writing a small app in qt that is to access some data in

  • 0

I’m writing a small app in qt that is to access some data in an sqlite database and stick it in a table. I’m completely new to qt and darn rusty with c++ so brace yourselves for a potentially stupid question…

So I have a QTableView and a database. I found a lovely little example at http://doc.trolltech.com/4.3/qsqlquerymodel.html#details that I will reproduce here for convenience:

 QSqlQueryModel *model = new QSqlQueryModel;
 model->setQuery("SELECT name, salary FROM employee");
 model->setHeaderData(0, Qt::Horizontal, tr("Name"));
 model->setHeaderData(1, Qt::Horizontal, tr("Salary"));

 QTableView *view = new QTableView;
 view->setModel(model);
 view->show();

Looks nice and simple. But alas! It turns out that the qt installer i used (for 32 bit windows) seems to not include the necessary libraries. So I started looking for them. Once I had the QSqlQueryModel class down I found that it had a load of dependencies too. So I hit the gitorious repo where everything is stored and subsequently found out that if I want to use the sqlite stuff I need to run ‘configure’ in order to enable the database driver i’m interested in before building the source.

I wondered around my qt installation directory a bit and there are some sql related dlls, I dont know what’s in them though.

So the question is, how do I get sqlite and qt talking nicely if i want to use qtCreator?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:11:34+00:00Added an answer on May 24, 2026 at 11:11 pm

    It’s been a while since I’ve done a Windows build but as far as I know it should prebuild the SQLite files, but I have a feeling it only does the SQLite2 ones.

    If you’ve tried the Qt instructions on building the driver and it’s still being a pain just make sure you’ve got the sqlite libraries, head into the applications folder and look for plugins/sqldrivers and there’ll be a .pro file in there to compile the drivers, you should be able to build that from the command line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
I am writing an app with both english and french support. The app requests
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.