I have a project that was originally developed in Creator 2.0.1 and when I try to run it on a new computer running Creator 2.4.1 it doesn’t work properly. I have a button that when pressed displays a manual. The code works fine on the other computer and when I copy the project to the new computer, clean the project, and rebuild the project, it displays a blank QTextDocument and in the appplication output window it shows “QTextBrowser: No document for UserManual.html” Here is the code I use:
Qt Code:
  1. void DlgHelpBrowser::showPage(const QString &page)
  2. {
  3. QString path= directoryOf("manual").absolutePath();
  4. qDebug()<<"path"<<path;//when run, this shows the correct path
  5. qDebug()<<"page"<<page;//and this shows the correct file
  6. DlgHelpBrowser *browser = new DlgHelpBrowser (path, page);
  7. browser->resize(1000, 800);
  8. browser->show();
  9. }
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. QDir DlgHelpBrowser::directoryOf(const QString &subdir)
  2. {
  3. QDir dir(QApplication::applicationDirPath());
  4. if (dir.dirName().toLower()== "debug" || dir.dirName().toLower()=="release")
  5. dir.cdUp();
  6. dir.cd(subdir);
  7. return dir;
  8. }
To copy to clipboard, switch view to plain text mode 
I use the exact same code on both machines, a direct copy, and it works on one but not on the other. Any ideas?