PDA

View Full Version : Guide for form creation in QT creator and to store values in SQLite



sivamsp
15th February 2012, 07:56
Hi,

I'm entirely new to QT. My requirement is, I need to create a form which gets integer, string from the user and stores it in SQLite or any other database. I'm using QT creator 4 in windows7. I need a step by step guide to do this right from designing a form to execution. Please post links and codings related to this.

Thanks,
Siva

KillGabio
15th February 2012, 17:45
Lol.....so many questions for your first post..

Well first of all create a Widget, or dialog, and add the fields you want to get the data from (for example a QLabel and a Line Edit, the first tells the user what data to insert and the latter is going to be the field where the user is going to enter the data)...Finally create a button and connect it to a slot where you do all the passing to the database..thats the general idea...When you create all this post your code and if something goes wrong i`ll help you.

ChrisW67
15th February 2012, 23:27
I'm entirely new to QT. My requirement is, I need to create a form which gets integer, string from the user and stores it in SQLite or any other database. I'm using QT creator 4 in windows7. I need a step by step guide to do this right from designing a form to execution. Please post links and codings related to this.

... and I need a pink unicorn but I cannot expect someone else to deliver one to me: I have to actually do some work to prove I can care for unicorns...

Read the friendly manual especially How to Learn Qt and some of the dozens of examples. When you have an idea what is possible and have made a start for yourself you might be able to ask specific questions about difficulties you encounter.

It should not take more than a couple of hours to get to the point of a running GUI. Perhaps a few more to get to an SQL database.