Skip to content

Commit

Permalink
Make sure pyqt5 works with external python interpreters on Win
Browse files Browse the repository at this point in the history
  • Loading branch information
dougmassay committed Oct 30, 2019
1 parent e53ac5d commit c96f7aa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Dialogs/PluginRunner.cpp
Expand Up @@ -329,10 +329,9 @@ void PluginRunner::startPlugin()
env.insert("PATH", QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + PATH_LIST_DELIM + env.value("PATH")));
// Set bundled Python environment.
m_process.setProcessEnvironment(env);
// If launched by another program, the new working directory could mess with how the
// bundled interpreter finds/loads PyQt5. So set it manually to the bundled interpreter's directory.
m_process.setWorkingDirectory(QDir::toNativeSeparators(QFileInfo(m_enginePath).absolutePath()));
}
//Whether bundled or external, set working dir to the directory of the interpreter being used.
m_process.setWorkingDirectory(QDir::toNativeSeparators(QFileInfo(m_enginePath).absolutePath()));
#elif !defined(Q_OS_WIN32) && !defined(Q_OS_MAC)
QString appdir = QCoreApplication::applicationDirPath();
if (settings.useBundledInterp()) { // Linux bundled Python settings
Expand Down

0 comments on commit c96f7aa

Please sign in to comment.