Results 1 to 15 of 15

Thread: What are the dll's and lib files to be added for my application ??

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Location
    Coimbatore,TamilNadu,India
    Posts
    382
    Thanks
    10
    Thanked 13 Times in 12 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default What are the dll's and lib files to be added for my application ??

    What are the dll's and lib files to be added for my application to run on the Non-Qt installed machine>>

    my source code is::

    Qt Code:
    1. QString host = QHostInfo::localHostName();
    2. QHostInfo hostinfo = QHostInfo::fromName(host);;
    3. QString address = "";
    4. if (!hostinfo.addresses().isEmpty()) {
    5. QList<QHostAddress> list = hostinfo.addresses();
    6. for(int i=0; i<list.count(); i++)
    7. {
    8. QString ip = list[i].toString();
    9. if(!ip.startsWith("0:") && !ip.startsWith("127."))
    10. {
    11. address.append(ip);
    12. break;
    13. }
    14. }
    15. }
    16.  
    17.  
    18. bool ok=false;
    19. QDateTime dateTime = QDateTime::currentDateTime();
    20.  
    21. QString dd=dateTime.toString("yyyy-MM-dd hh:mm:ss");
    22.  
    23. QHostInfo info;
    24. QString IPAddress;
    25. QHostAddress Address;
    26. //QMessageBox::information(this,"","" + info.localHostName() + "");
    27. QString hostname=info.localHostName();
    28. //QMessageBox::warning(NULL,"Hostname",hostname,QMessageBox::Ok);
    29.  
    30.  
    31.  
    32. //QMessageBox::warning(NULL,"DriveList",OrigDateTime,QMessageBox::Ok);
    33.  
    34. QStringList list=QSqlDatabase::drivers();
    35. QString driveList;
    36. for(int i=0;i<list.length();i++)
    37. {
    38. driveList += list[i];
    39. }
    40. //QMessageBox::warning(NULL,"DriveList",driveList,QMessageBox::Ok);
    41. QSqlDatabase db= QSqlDatabase::addDatabase("QMYSQL3");
    42. db.setHostName("172.16.0.1");
    43. db.setDatabaseName("screengrabber");
    44. db.setUserName("scre");
    45. db.setPassword("1234");
    46. ok = db.open();
    47.  
    48. QString servstr="1";
    49. //servstr.number(serv,2);
    50.  
    51. /*QMessageBox::warning(NULL,"IPNAME",ipname,QMessageBox::Ok);
    52.   QMessageBox::warning(NULL,"datetime",datetime,QMessageBox::Ok);
    53.   QMessageBox::warning(NULL,"serv",servstr,QMessageBox::Ok);*/
    54.  
    55.  
    56. QSqlQuery querylog(db);
    57. querylog.exec("INSERT INTO service_log (ip_address,date_time, service_status, logged_user)VALUES (?,?,?,?)");
    58. querylog.bindValue(0,address);
    59. querylog.bindValue(1,dd);
    60. querylog.bindValue(2,servstr);
    61. querylog.bindValue(3,hostname);
    62.  
    63. /*bool qrylog=querylog.exec("INSERT INTO service_log (ip_address,date_time, service_status, logged_user)"
    64.   "VALUES ('172.16.0.51','2011-07-28 15:55:09',1,'ramachandran')");*/
    65.  
    66. bool qrylog= querylog.exec();
    67. /*QString success = querylog.lastError().text();
    68.   QMessageBox::warning(NULL,"Error",success,QMessageBox::Ok);
    69.   QString execquery=querylog.executedQuery();*/
    70. //QMessageBox::warning(NULL,"Executed Query",execquery,QMessageBox::Ok);
    71.  
    72. //QHostAddress info1=info.fromName("localhost").addresses().first();
    73.  
    74. db.close();
    75.  
    76.  
    77.  
    78. for(;;)
    79. {
    80.  
    81. /*QSqlDatabase db= QSqlDatabase::addDatabase("QMYSQL3");
    82.   db.setHostName("172.16.0.1");
    83.   db.setDatabaseName("screengrabber");
    84.   db.setUserName("scre");
    85.   db.setPassword("1234");*/
    86. bool opened = db.open();
    87.  
    88.  
    89. originalPixmap =QPixmap();
    90. originalPixmap = QPixmap::grabWindow(QApplication::desktop()->winId());
    91. QString strfname;
    92. strfname.sprintf("%d",c);
    93. originalPixmap.save("C:\\Program Files\\image"+strfname+".jpeg","jpeg");
    94. c++;
    95. char Data;
    96. QFile file("C:\\Program Files\\image"+strfname+".jpeg");
    97. file.open(QIODevice::ReadOnly);
    98. //file.seek(0);
    99. int len=file.size();
    100. //buf=file.read(len);
    101. buf=file.readAll();
    102. file.close();
    103. file.remove();
    104. QSqlQuery query;
    105. query.exec("INSERT INTO log (grab_date, ip_address, image,logged_user) "
    106. "VALUES (?,?,?,?)");
    107. query.bindValue(0,dd);
    108. query.bindValue(1,address);
    109. query.bindValue(2,buf);
    110. query.bindValue (3,hostname);
    111. bool qry=query.exec();
    112.  
    113. int length=buf.length();
    114.  
    115. //QMessageBox::warning(NULL,"DriveList",strquery,QMessageBox::Ok);
    116.  
    117. //QString success1 = query.lastError().text();
    118. //QMessageBox::warning(NULL,"Error",success1,QMessageBox::Ok);
    119. //QString execquery1=query.executedQuery();
    120. //QMessageBox::warning(NULL,"Executed Query",execquery1,QMessageBox::Ok);
    121.  
    122. db.close();
    123.  
    124.  
    125. /*QFile newfile("D:\\img.txt");
    126.   newfile.open(QIODevice::WriteOnly);
    127.   newfile.write(buf);*/
    128.  
    129. int iSecret, iRandom;
    130. iSecret = rand() % 20 + 1;
    131. iRandom=iSecret*60000;
    132.  
    133. QMutex mutex;
    134. mutex.lock();
    135. QWaitCondition waitCondition;
    136. waitCondition.wait(&mutex, iRandom);
    137. mutex.unlock();
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: What are the dll's and lib files to be added for my application ??

    Start with the ones you list in your PRO file.

Similar Threads

  1. QML files in QT application
    By nageshvk in forum Qt Quick
    Replies: 8
    Last Post: 1st December 2010, 07:03
  2. Replies: 1
    Last Post: 28th October 2010, 22:36
  3. To identify executable and other files in QT Application
    By augusbas in forum Qt Programming
    Replies: 3
    Last Post: 8th March 2010, 18:29
  4. Installation of application data files
    By anderssonj in forum Qt Programming
    Replies: 1
    Last Post: 4th July 2007, 16:02
  5. How to open IGES files in Qt Application?
    By Shuchi Agrawal in forum Newbie
    Replies: 1
    Last Post: 21st February 2007, 01:06

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.