Skip to content
Permalink
Browse files
Make sure pyqt5 works with external python interpreters on Win
  • Loading branch information
dougmassay committed Oct 30, 2019
1 parent e53ac5d commit c96f7aa1cde8834549bee11673c81cd1374e962c
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/Dialogs/PluginRunner.cpp
@@ -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

0 comments on commit c96f7aa

Please sign in to comment.