Commit Graph

22 Commits

Author SHA1 Message Date
Matthias Koefferlein 16604e5a92 New module: 'pex' 2025-04-18 13:12:45 +02:00
Matthias Koefferlein 92204915a4 Refactoring: pya is a native binary package now. It's available to pymod, but may also be the basis of the built-in pya module. 2023-03-08 23:54:32 +01:00
Matthias Koefferlein 684ece41d1 Fixed qmake-based builds after changing setup.py 2022-05-14 00:00:35 +02:00
Matthias Koefferlein b2b5e5ad55 Modifications to enable building of Qt-less canvas in setup.py 2022-05-12 01:53:16 +02:00
Matthias Koefferlein 82909001c4 Build fixes with pymod 2021-12-03 07:28:09 +01:00
Matthias Koefferlein a4d2e7891c WIP 2021-11-24 23:59:36 +01:00
Matthias Koefferlein ca15d9ec9d WIP 2021-10-18 00:12:46 +02:00
Matthias Koefferlein 687059525c Fine-grained Qt module selection for Qt binding and disabling of view_25d plugin without OpenGL 2021-03-02 23:28:35 +01:00
Matthias Koefferlein 2a9564856b Fixed Qt-binding less builds 2021-02-28 23:31:06 +01:00
Matthias Koefferlein 33ae3b0239 Added a build system option to enable/disable uitools support as some distributions do not support that 2021-02-27 18:03:37 +01:00
Matthias Köfferlein b968f2b47f
#730: providing a new Qt module named QtUiTools for QUiLoader class s… (#735)
* #730: providing a new Qt module named QtUiTools for QUiLoader class support.

* Fixed a compile error on Mac

* Added QtUiTools to some more places

* Fixed a linker issue in the QtUiTools Python lib

* On occasion fixed a infinite recursion problem in the debugger

The recursion happened because by mistake I instantiated a
QApplication inside an in-application Python script. This
crashed the debugger due to infinite recursion. This is not
a real use case but to prevent similar issues, a recursion
sentinel was added.

* Removed QCoreApplication#notify from script bindings

Reasoning: "notify" made standalone scripts using QApplication and
QUiLoader virtually impossible.

Problem description:
- When a QApplication object is instantiated, e.g. in Python, the Qt binding
  will install reimplementation hooks as the object may be dynamically
  extended.
- A notify is virtual this means the *every* "notify" call in the application
  is routed through the interpreter.
- For one thing this will slow down the application
- But as "notify" is called a zillion times this has more than this side effect.
- Specifically "notify" is called from within the QWidget constructor to
  indicate a new widget. Then, if a QDialog for example is instatiated, it's
  base class constructor will call "notify" when the object isn't ready yet.
- This has another severe side effect: as the object isn't ready yet, it gets
  registered in the Python space with the wrong class and QDialog is not visible
  as such.

To mitigate these problems, the most efficient solution is to disable "notify"
in general. There is hardly any use case in a script environment (in C++,
apart from hacking the only reasonable use case is exception handling, but
this does not apply to scripts). For providing the call functionality of
"notify" you should better use "postEvent" or "sendEvent" anyway.

So farewell QCoreApplication.notify ...

* Fixed python test for QtUiTools module

* Fixed UiTools test on Qt4 - QUiLoader needs an application object

Co-authored-by: Kazunari Sekigawa <kazunari.sekigawa@gmail.com>
2021-02-25 21:29:21 +01:00
Matthias Koefferlein 61a61a2a5a WIP: added lib module to qmake-based python module build
This works:

  import klayout.db
  import klayout.lib
  print(klayout.db.Library.library_names())   # says ["Basic"]

Also works:

  from klayout import *

Does not work:

  # import klayout.lib needs to be done before the libraries
  # are used initially
  import klayout.db
  print(klayout.db.Library.library_names())   # says []
  import klayout.lib
  print(klayout.db.Library.library_names())   # says []
2019-04-03 01:07:22 +02:00
Matthias Koefferlein a82adbbe83 Massive reduction of Qt dependencies, but also massive refactoring. 2018-07-03 00:51:36 +02:00
Matthias Koefferlein 757c6af80f WIP: rdb module for Python, fixed unit tests for non-Qt bindings case 2018-06-15 22:49:01 +02:00
Matthias Koefferlein 2737e14b13 WIP: some refactoring of the GSI Python binding (less static objects, new conversion operators, preparations for external use) 2018-06-09 01:50:16 +02:00
Matthias Koefferlein f3f6e2e7ba WIP: unit tests for pykl, some build errors fixed. 2018-06-03 23:36:06 +02:00
Matthias Koefferlein f093b305bf WIP: include __init__.py generation in .pro files. 2018-06-03 13:05:12 +02:00
Matthias Koefferlein 0ed898e3c2 WIP: proper dependencies to avoid build issues. 2018-06-03 12:16:52 +02:00
Matthias Koefferlein 3cabb23be1 WIP: more Qt Python modules and better build scheme. 2018-06-02 00:50:57 +02:00
Matthias Koefferlein 3882f6a3b1 WIP: further generation of Python module (kind of slow currently + dependent modules need to be loaded manually) 2018-05-31 23:22:35 +02:00
Matthias Koefferlein 07d9363ea7 WIP: more python modules, made gsi initialization safe against duplicate init. 2018-05-31 20:51:09 +02:00
Matthias Koefferlein 6468bb7ab9 WIP: refactoring of GSI structure for separated modules. 2018-05-30 00:39:58 +02:00