You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -28,11 +28,11 @@ Qt.py was born to address the growing needs in these industries for the developm
28
28
29
29
Qt.py was born in the film and visual effects industry to address the growing needs for the development of software capable of running with more than one flavor of the Qt bindings for Python - PySide, PySide2, PyQt4 and PyQt5.
30
30
31
-
| Goal | Description
32
-
|:--------------------------|:---------------
33
-
| *Support co-existence* | Qt.py should not affect other bindings running in same interpreter session.
34
-
| *Keep it simple* | One file, copy/paste installation, PEP08.
35
-
| *No bugs* | No implementations = No bugs.
31
+
| Goal | Description
32
+
|:---------------------------|:---------------
33
+
| [*Support co-existence*](#support-coexistence) | Qt.py should not affect other bindings running in same interpreter session.
34
+
| [*Keep it simple*](#keep-it-simple) | One file, copy/paste installation, PEP08.
35
+
| [*No wrappers*](#no-wrappers) | Don't attempt to fill in for missing functionality in a binding.
36
36
37
37
Each of these deserve some explanation and rationale.
@@ -67,6 +66,20 @@ At the end of the day, Qt.py is a middle-man. It delegates requests you make to
67
66
68
67
<br>
69
68
69
+
#### No wrappers
70
+
71
+
One approach at bridging two different implementations is by implementing missing functionality yourself.
72
+
73
+
A [common example](https://gist.github.com/cpbotha/1b42a20c8f3eb9bb7cb8) of this is the differing argument signature in `loadUi` from PyQt4 versus PySide.
74
+
75
+
One problem with this approach is that bindings are already wrapping an original implementation and carries a large surface area for bugs with it. By wrapping it once more, we multiply this surface area, resulting in potential for even more obscure bugs that may take years to experience and filter out.
76
+
77
+
By instead limiting the argument signature to ones they both share, we both (1) reduce the surface area (2) avoid introducing additional bugs.
78
+
79
+
We believe neither approach is right or wrong - this is simply the approach taken here that turns out to be the easier and more robust rule to follow consistently as a team.
80
+
81
+
<br>
82
+
70
83
##### No bugs
71
84
72
85
This may seem like an impossible requirement, but hear me out. Bugs stem from implementations. Therefore, if there are no implementations, there can be no bugs.
Copy file name to clipboardExpand all lines: README.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,14 +28,15 @@ Qt.py enables you to write software that dynamically chooses the most desireable
28
28
29
29
### Project goals
30
30
31
+
Write for PySide2, run in any binding.
31
32
32
-
Qt.py was born in the film and visual effects industry to address the growing need for the development of software capable of running with more than one flavour of the Qt bindings for Python - PySide, PySide2, PyQt4 and PyQt5.
33
+
Qt.py was born in the film and visual effects industry to address the growing need for software capable of running with more than one flavor of the Qt bindings for Python - PySide, PySide2, PyQt4 and PyQt5.
| *Build for one, run with all* | You code written with Qt.py should run on any binding.
37
-
| *Explicit is better than implicit* | Differences between bindings should be visible to you.
38
37
| *Support co-existence* | Qt.py should not affect other bindings running in same interpreter session.
38
+
| *Build for one, run with all* | Code written with Qt.py should run on any binding.
39
+
| *Explicit is better than implicit* | Differences between bindings should be visible to you.
39
40
40
41
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for more details.
41
42
@@ -45,7 +46,7 @@ See [`CONTRIBUTING.md`](CONTRIBUTING.md) for more details.
45
46
46
47
### Install
47
48
48
-
Qt.py is a single file and can either be [copy/pasted](https://raw.githubusercontent.com/mottosso/Qt.py/master/Qt.py) into your project, [downloaded](https://github.com/mottosso/Qt.py/archive/master.zip) as-is or installed via PyPI.
49
+
Qt.py is a single file and can either be [copy/pasted](https://raw.githubusercontent.com/mottosso/Qt.py/master/Qt.py) into your project, [downloaded](https://github.com/mottosso/Qt.py/archive/master.zip) as-is, cloned as-is or installed via PyPI.
0 commit comments