-
Notifications
You must be signed in to change notification settings - Fork 548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyQt or 'Qt for Python' (PySide2)? #1875
Comments
@ferdnyc - I did read through this already. Just delayed in my response since we have an overwhelming amount of issues (over 500 now). I will have a much closer look at the PySide2 Technical Preview. Maybe I will just replace the imports and see what happens: from PySide2 import QtCore
from PySide2.QtCore import Qt, QUrl
from PySide2.QtGui import QCloseEvent, QKeySequence, QIcon
from PySide2.QtWidgets import (qApp, QAction, QApplication, QDesktopWidget,
QDockWidget, QLabel, QLineEdit, QMainWindow, QMenu, QMenuBar, QPushButton,
QStatusBar, QToolBar)
from PySide2.QtWebEngineWidgets import (QWebEngineDownloadItem, QWebEnginePage,
QWebEngineView) Looks like a minor change with hopefully no real side effects. |
*nod* Other than the import names, it sounds like the decorator swap ( Oh, right, and the resource file(s) — PySide also gives us the option to compile the |
Thank you so much for submitting an issue to help improve OpenShot Video Editor. We are sorry about this, but this particular issue has gone unnoticed for quite some time. To help keep the OpenShot GitHub Issue Tracker organized and focused, we must ensure that every issue is correctly labelled and triaged, to get the proper attention. |
In #1864 @DylanC and I were discussing the Timeline implementation and the possible benefits of QML / QT Quick when compared to the current Angular JS.
I realized that there's another, potentially related implementation question looming.
Now that there's an official Qt for Python, based on the old PySide project which the Qt team decided to adopt and support, should OpenShot-qt be written in PySide2 instead of PyQt? And, how much would be involved in porting it over?
On the face of it, there's very little difference between the two. The top of one of their example Python source files looks like this:
Which should seem pretty familiar, compared to our
src/windows/views/timeline_webview.py
:There do appear to be some other differences, though mostly minor.
@Signal
, not@pyqtSignal
.QUiLoader
, via itsload()
method, which takes an already-openedQFile
object. There's noPyQt5.uic
, which takes a pathname. That apparently caused some problems when OpenShot is in its frozen state, with the code having to retry the load a few times to findmain_window.ui
. (Seesrc/classes/ui_util.py
at theload_ui()
function). So, it's possible PySide2 would solve that for us.Unfortunately, the Qt Wiki document Differences between PySide and PyQt is over three years old and covers only PySide (not PySide2) vs. PyQt4. And while someone did a comparison of PySide2 vs. PyQt5, with a focus on what PySide2 lacked, that was almost 2 years ago.
While a similar comparison has been periodically posted to the Qt Wiki, updated as recently as a couple of months ago (Qt 5.11), whoever ran the most recent comparison didn't have PyQt5 installed, so there's no info on what PyQt5 has that PySide still lacks. In general, though, most of what's missing appears to be either:
There are some more classes that PySide2 provides which PyQt5 does not, though again we're unlikely to touch those: things like Qt3D{Core,Render,Input,Logic,Animation,Extras} (again, there's a separate PyQt3D for those), or QtConcurrent.
As of the most recent report, there are 219 Qt types missing in PySide2. Which may sound like a lot, as of the previous report (vs. Qt 5.9) there were 163 types missing, and only 41 of those present in PyQt5. So, like I said: Mostly either very new, or very obscure.
The text was updated successfully, but these errors were encountered: