Skip to content
Snippets Groups Projects
Commit b5cf701c authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

PythonQt: initialize sys.argv with static string.

parent c71d6159
No related branches found
No related tags found
No related merge requests found
from PythonQt import QtGui, Qt
from gepetto.corbaserver import Client
import sys
sys.argv = ["none"]
### This class represents one special tab of the new QDockWidget
class _NodeCreator (QtGui.QWidget):
......
......@@ -34,8 +34,8 @@ namespace gepetto {
PythonQt::init(PythonQt::RedirectStdOut);
PythonQt_QtAll::init();
mainContext_ = PythonQt::self()->getMainModule();
PythonQtObjectPtr sys = PythonQt::self()->importModule ("sys");
sys.addVariable ("argv", QVariant(QStringList () << "toto.py"));
PythonQtObjectPtr sys = PythonQt::self()->importModule ("sys");
sys.evalScript ("argv = ['gepetto-gui']");
console_ = new PythonQtScriptingConsole(NULL, mainContext_);
mainContext_.addObject("mainWindow", MainWindow::instance());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment