Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
6.1.1
-
None
-
Manjaro (Arch-based) KDE Stable
Description
import sys from PySide6.QtCore import QLibraryInfo, qVersion from PySide6.QtWidgets import QApplication,QWidget class Window(QWidget): def __init__(self): super(Window, self).__init__() def about_to_quit(): print("about_to_quit") with open('about_to_quit.txt', 'w') as f: f.write("a") def commit_data(): print("commit_data") with open('commit_data.txt', 'w') as f: f.write("a") if __name__ == '__main__': print('Python {}.{}'.format(sys.version_info[0], sys.version_info[1])) print(QLibraryInfo.build()) app = QApplication(sys.argv) window = Window() window.setWindowTitle(qVersion()) window.show() app.aboutToQuit.connect(about_to_quit) app.commitDataRequest.connect(commit_data) app.exec_() sys.exit(app.exec_())
When I install pyside6 though my package manager (Arch repositories), this code works perfectly, both aboutToQuit and commitDataRequest are emitted (both files are created) when I logout while the app is running.
However when I run this code under a pip-installed pyside6 (system pip or virtual env) and logout while it is running, the signals are not emitted and none of the files are created. I think this also happens on shutdown/reboot (not fully tested).
This makes virtual environments (pipenv, etc) unusable. This doesn't seem like intended behaviour as the quick start guide refers venvs/pip install with no disclaimer/caution. Not sure if this is a Qt bug, but I would be grateful if I get pointed in the right direction or if at least someone can reproduce it.
I am fairly certain this also happens on PySide2, PyQt5 and spills over to a executable using PyInstaller based on a project I was working on.
Attachments
Issue Links
- relates to
-
QTBUG-28228 Regression: QSessionManager lost all the X11 code
- Closed
- resulted in
-
QTBUG-95004 XCB: Qt packages are built without session management support
- Reported