Is loading a built exe from QT Creator different from loading the exe from file system? [webkit issue]



  • I'm writing a desktop app that connects to my company's intranet. The page I'm trying to load is HTTP, but it will redirect to a login site that uses HTTPS. The app loads the page well when launched from QT Creator (both redirection and authentication succeeded, and the page is shown correctly), but when I run the app from file system (all DLLs are put into the folder correctly), the loading fails (QWebView's loadFinished(bool) signal is emitted with a false, which is a rare case as I learned online). I can catch the first 302 redirection status from QNetworkManager's SIGNAL(finished(QNetworkReply*)), but when the second time the signal is captured, the status becomes invalid. From QNetworkReply's documentation I read that "If the connection was not HTTP-based, this attribute will not be present." I don't know why. In addition, not SSL error signal is emitted. Since the app runs well from QT Creator (FYI QT creator is not running with privilege), I assume it should be due to some difference in environment when launching. Another thing is that the app ran ok from FS several days ago but fails now. (I tried the backed up build from several days ago recently but with no luck) I don't know if that's some server side problem since I tried on multiple computers, which all managed to run the app before. But the most weird thing is why it has no problem when launching from IDE. Anyone have a clue? Thanks!


  • Moderators

    Check the environment Creator uses to run your application. We do change it to make sure stuff runs by adding tool chain/Qt version specific PATH elements, etc. So check any setting that might influence where libraries are located (PATH on windows, LD_LIBRARY_PATH on Linux, etc.).

    A way to see all the changes we do is to just switch the base build environment to "empty envrionment". We will still do our changes, so they do stand out then;-)



  • Problem solved. Thank you very much! I modified the system PATH to match the PATH in build environment, and the connection is set successfully. Although I still don't know exactly which DLL that I put to the release folder is wrong, at least I can confirm that the problem is not from server side now. I think I should be able to examine and find the correct DLL later. Again, thank you!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.