Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
Qt Creator 4.2.0
-
None
-
Windows 7 and Windows 10
Qt 5.8 MinGW and MSVC2015 32bit
Description
The working directory setting from project's run configuration seems not to be applied after a fresh installation on Windows.
Steps to reproduce:
- Installation from scratch
- Create a new empty QtQuick project
- Add a `qDebug() << engine.baseUrl();` debug output right after initializing the engine in main.cpp
- Debug output is *user's home directory*
I guess this is due to the fact that empty QDir() uses the current working directory as base path, and as the working dir is not set from the Qt Creator session it falls back to the user dir.
Steps to temp. fix the issue:
- Open the projects run configuration
- Check the checkbox "Run in terminal" and uncheck it again
- From now on the baseUrl is correctly set to the *shadow build directory*, as it was the case with Qt Creator 4.1
Interestingly, the setting is persistent somewhere outside of the project files, after closing Qt Creator, deleting the shadow build directory, clearing the .pro.user file and re-opening Qt Creator, the correct working directory is still applied.
I tested this on latest Qt 5.8 MinGW and MSVC2015 32bit, they both have the same behavior.
Probably related: https://bugreports.qt.io/browse/QTBUG-57651
Attachments
Issue Links
- duplicates
-
QTCREATORBUG-17661 Inconsistent application current directory when running from QtCreator
- Closed
- is duplicated by
-
QTCREATORBUG-17146 ProjectManager: Sometimes failing to start application
- Closed