aboutsummaryrefslogtreecommitdiffstats
path: root/examples/projects/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* Clean up import hierarchyEike Ziller2018-09-281-3/+3
| | | | | | | | | | | | | PythonExtension.QtCreator.* -> QtCreator.* PythonExtension.PluginInstance -> QtCreator.PythonExtensions Also enables imports of the form "from QtCreator import Core" it is no longer necessary to write QtCreator.Core.... Change-Id: Ib9b433868dcc3fc7d1d534c6023bae7bf6d05fec Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix example extensions for Python 3Eike Ziller2018-09-201-1/+1
| | | | | | | | Implicit relative imports are no longer allowed and need to be made explicit. Change-Id: Ic4de2d98229149b4d2920057974f895d9600368b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* The product name is "Qt Creator" with a spaceEike Ziller2018-09-171-1/+1
| | | | | Change-Id: I6716ab0b26f8881e07580df19bc29dd3c3146ae7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Clean up python extension examplesEike Ziller2018-09-171-2/+8
| | | | | | | | | - create a single Tools submenu for the examples - share the code that creates the menu if necessary between all examples - make all the actions nice Qt Creator commands Change-Id: Ia5ed41a1bb440a1a8087821cc9d9daaa4c8f585a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix 'projects' exampleEike Ziller2018-09-171-1/+3
| | | | | | | Missed the QtCreator import Change-Id: I6e8a9180e7f2f018a018f9ebc587bf6ca015b247 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix encapsulation of pluginsEike Ziller2018-09-141-0/+63
Fixes that triggering "About Python Extensions" action resulted in python runtime error "TypeError: must be type, not None" when referencing PySide2.QtWidgets. To improve encapsulation of plugins, all modules that they loaded were deleted after their main.py finished running. This breaks if these modules were accessed later e.g. triggered by actions. Instead of this hack, ensure encapsulation of plugins by making them actual Python packages. Qt Creator's python extension path is added to python's module search path, and extensions are simply imported as packages. The python extension's main.py simply becomes a standard python module __init__.py. This also means that python extensions can depend on, and use other python extensions' functionality by importing them with "import". Change-Id: Ibe74c24e337b321007f5fa19c97bd35a5c1f0375 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>