mvbhavsar
10th February 2011, 08:03
Hi,
I have a file called database.h having following content.
================================================== =========
#ifndef DATABASE_H
#define DATABASE_H
#include <QtCore>
#include <QtSql>
class database
{
public:
database();
bool connectDB();
private:
QSqlDatabase db;
};
#endif // DATABASE_H
================================================== ======
Now I want to append some text in this file after finding some phrase in this.
e.g. after all #include lines I want to add #include <QtGui>
or
after private: string I want to add QSqlQuery qry;
How to achieve this using seek() function?
Thanks in advance
Manish
I have a file called database.h having following content.
================================================== =========
#ifndef DATABASE_H
#define DATABASE_H
#include <QtCore>
#include <QtSql>
class database
{
public:
database();
bool connectDB();
private:
QSqlDatabase db;
};
#endif // DATABASE_H
================================================== ======
Now I want to append some text in this file after finding some phrase in this.
e.g. after all #include lines I want to add #include <QtGui>
or
after private: string I want to add QSqlQuery qry;
How to achieve this using seek() function?
Thanks in advance
Manish