Hi and welcome to devnet forum
There are a couple of SQL examples available with Qt. They shall give you a good start for your implementations. Note: the examples are programmed without external dependencies, therefore you will have some parts for your actual implementation.
I think it is wrong if make a new connection to database for each operation. so i need some help about how to make connection with DB and how implement it so that app work as fast as possible.
thanks for reading and answering.
There is an example in the detailed description section on how to add and open an SQL db. Note: that the addDatabase is a static routine. You do not have to add and open the db with every statement. With the static routine it will be opened once and kept open until you decide to change this.