Commit Graph

20 Commits

Author SHA1 Message Date
Matthias Koefferlein 2b4a583f05 Update copyright year 2024-01-01 17:27:59 +01:00
Matthias Koefferlein 31aa45dce4 Qt5 binding enhancements
- Based on Qt 5.12.12 now (tested to build on 5.15)
- QImage constructor with binary data
- More classes, specifically QLibraryInfo for Qt version
- QLayout and derivatives take ownership over widgets added
2023-03-25 22:54:54 +01:00
Matthias Koefferlein a85dbd3d31 Updating copyright notice to 2023 2023-01-01 22:27:22 +01:00
Matthias Koefferlein 12fd26663d Merge branch 'qt6' 2022-01-06 21:48:02 +01:00
Matthias Koefferlein 10456516db Updated copyright to 2022, preparations for 0.27.6 (was delayed due to code signing certificate issues) 2022-01-04 21:20:04 +01:00
Matthias Koefferlein dfa1c0dbfd WIP: Qt bindings almost compile 2021-11-28 23:53:58 +01:00
Matthias Koefferlein aeba3f5df8 WIP: adjusting simple parser for C++17 (somewhat) 2021-11-27 00:08:50 +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 7d4310d343 Updated copyright to 2021 2021-01-05 22:57:48 +01:00
Matthias Köfferlein 69e7704430
Issue 501 (#505)
* Fixed #501 (more Qt ownership management) - this commit contains some more changes because I had to regenerate the Qt binding sources.

* Fixed #501 (Qt object ownership transfer) - repairs, added tests

* Updated Jenkinsfile to not publish a PR build

* Update Jenkinsfile - exclude PR's from build
2020-02-21 18:25:22 +01:00
Matthias Koefferlein b8c82c4f8b Updated copyright notice to 2020 2020-01-05 00:59:43 +01:00
Matthias Koefferlein b0d7f5f7f5 Updated copyright. 2019-01-08 00:58:45 +01:00
Matthias Koefferlein a20c3259bf WIP: refactored mkqtdecl configuration (common part factored out), fixed .pro file dependencies 2018-06-05 23:21:15 +02:00
Matthias Koefferlein 40b2e9a1a5 WIP: usable constructors for QApplication and related. 2018-06-02 22:21:59 +02:00
Matthias Koefferlein b91a3b5cad WIP: added Qt5 support 2018-05-31 09:19:26 +02:00
Matthias Koefferlein 6468bb7ab9 WIP: refactoring of GSI structure for separated modules. 2018-05-30 00:39:58 +02:00
Matthias Koefferlein ffb56335fb Updated copyright note to 2018. 2018-01-01 21:08:06 +01:00
Matthias Koefferlein 1f60e7729e Qt signals can be bound to functions with less args in Python
With this change it is possible to bind signals to functions
accepting less arguments. For example:

    def triggered():
      ...

    b = pya.QPushButton()
    b.clicked(triggered)
    b.emit_clicked(True)

wasn't working before since triggered() gets one parameter
(checked) and the call fails. Now, additional parameters are
ignored.
2017-02-24 23:48:47 +01:00
Matthias Koefferlein 83f12382e8 Refactoring: there is one Qt binding lib. 2017-02-23 01:19:02 +01:00
Matthias Koefferlein c15179aa19 Added scripts for Qt generation. 2017-02-21 20:32:40 +01:00