Finally I have made a working code; if It may help somebody else here it is:

Qt Code:
  1. MainWindow::MainWindow()
  2. {
  3. ...
  4. http = new QHttp(this);
  5. connect(http, SIGNAL(requestFinished(int, bool)), this, SLOT(httpRequestFinished(int, bool)));
  6. connect(http, SIGNAL(responseHeaderReceived(const QHttpResponseHeader &)), this, SLOT(readResponseHeader(const QHttpResponseHeader &)));
  7.  
  8. file = 0;
  9. downloadFile();
  10. }
  11.  
  12. MainWindow::~MainWindow()
  13. {
  14. if(file) {
  15. delete file;
  16. file = 0;
  17. }
  18. }
  19.  
  20. void MainWindow::downloadFile()
  21. {
  22. if(file) {
  23. delete file;
  24. file = 0;
  25. }
  26.  
  27. QUrl url("http://localhost/sito/lastrelease.xml");
  28.  
  29. file = new QTemporaryFile;
  30. if (!file->open()) {
  31. statusBar()->showMessage(tr("Impossible to save the file %1: %2.").arg(file->fileName()).arg(file->errorString()));
  32. delete file;
  33. file = 0;
  34. return;
  35. }
  36.  
  37. http->setHost(url.host(), url.port(80));
  38.  
  39. httpRequestAborted = false;
  40. httpGetId = http->get(url.path(), file);
  41. }
  42.  
  43. void MainWindow::httpRequestFinished(int requestId, bool error)
  44. {
  45. if (requestId != httpGetId)
  46. return;
  47. if (httpRequestAborted) {
  48. if(file) {
  49. file->close();
  50. file->remove();
  51. }
  52. return;
  53. }
  54.  
  55. if (requestId != httpGetId)
  56. return;
  57.  
  58. file->close();
  59.  
  60. if (error) {
  61. file->remove();
  62. statusBar()->showMessage(tr("Download failed: %1.").arg(http->errorString()));
  63. } else {
  64. statusBar()->showMessage(tr("lastrelease downloaded"));
  65. }
  66. }
  67.  
  68. void MainWindow::readResponseHeader(const QHttpResponseHeader &responseHeader)
  69. {
  70. if (responseHeader.statusCode() != 200) {
  71. statusBar()->showMessage(tr("Download failed: %1.").arg(responseHeader.reasonPhrase()));
  72. httpRequestAborted = true;
  73. http->abort();
  74. return;
  75. }
  76. }
To copy to clipboard, switch view to plain text mode 

Also the xml part of the work is ok. I have to decide where store the current versions of application/database: for application probably is better in the code for simple retrieving; for database I don't know if is better to store it in a table or in the name of the db file (db-20070115 for example). Perhaps the first solution is simpler. What do you say?

Thanks