What are the dll's and lib files to be added for my application to run on the Non-Qt installed machine??
QString host = QHostInfo::localHostName();
QHostInfo hostinfo = QHostInfo::fromName(host);;
QString address = "";
if (!hostinfo.addresses().isEmpty()) {
QList<qhostaddress> list = hostinfo.addresses();
for(int i=0; i<list.count();> {
QString ip = list[i].toString();
if(!ip.startsWith("0:") && !ip.startsWith("127."))
{
address.append(ip);
break;}}}
bool ok=false;
QDateTime dateTime = QDateTime::currentDateTime();
QString dd=dateTime.toString("yyyy-MM-dd hh:mm:ss");
QHostInfo info;
QString IPAddress;
QHostAddress Address;
QString hostname=info.localHostName();
QStringList list=QSqlDatabase::drivers();
QString driveList;
for(int i=0;i<list.length();i++)>
{
driveList += list[i];
}
QSqlDatabase db= QSqlDatabase::addDatabase("QMYSQL3");
db.setHostName("172.16.0.1");
db.setDatabaseName("screengrabber");
db.setUserName("scre");
db.setPassword("1234");
ok = db.open();
QString servstr="1";
QSqlQuery querylog(db);
querylog.exec("INSERT INTO service_log (ip_address,date_time, service_status, logged_user)VALUES (?,?,?,?)");
querylog.bindValue(0,address);
querylog.bindValue(1,dd);
querylog.bindValue(2,servstr);
querylog.bindValue(3,hostname);
bool qrylog= querylog.exec();
db.close();
for(;;)
{
bool opened = db.open();
originalPixmap =QPixmap();
originalPixmap = QPixmap::grabWindow(QApplication::desktop()->winId());
QString strfname;
strfname.sprintf("%d",c);
originalPixmap.save("C:\\Program Files\\image"+strfname+".jpeg","jpeg");
c++;
char Data;
QFile file("C:\\Program Files\\image"+strfname+".jpeg");
file.open(QIODevice::ReadOnly);
int len=file.size();
QByteArray buf;
buf=file.readAll();
file.close();
file.remove();
QSqlQuery query;
query.exec("INSERT INTO log (grab_date, ip_address, image,logged_user) "
"VALUES (?,?,?,?)");
query.bindValue(0,dd);
query.bindValue(1,address);
query.bindValue(2,buf);
query.bindValue (3,hostname);
bool qry=query.exec();
int length=buf.length();
db.close();
int iSecret, iRandom;
iSecret = rand() % 20 + 1;
iRandom=iSecret*60000;
QMutex mutex;
mutex.lock();
QWaitCondition waitCondition;
waitCondition.wait(&mutex, iRandom);
mutex.unlock();
</qhostaddress>