QtAsyncio handle_sigint QDockWidget Timer Issue?
Unsolved
Qt for Python
-
I was going to start integrating asyncio into my application. If I use
QtAsyncio.run(handle_sigint=True)
I get the following output if I use Ctrl+C in the console:
QObject::killTimer: Timers cannot be stopped from another thread QObject::~QObject: Timers cannot be stopped from another thread
I've narrowed this down to using QDockWidget. Here is a minimally reproducible example (basically the minimal example on the docs trimmed down to just a dock widget) :
# Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause from __future__ import annotations from PySide6.QtWidgets import (QApplication, QMainWindow, QDockWidget) import PySide6.QtAsyncio as QtAsyncio import sys class MainWindow(QMainWindow): def __init__(self): super().__init__() widget = QDockWidget() self.setCentralWidget(widget) if __name__ == "__main__": app = QApplication(sys.argv) main_window = MainWindow() main_window.show() QtAsyncio.run(handle_sigint=True)
Based on my understanding of asyncio, I'm not spinning up an additional thread, so I'm confused. I supposed it's possible that the SIGINT comes from another thread and there's improper handling there. I couldn't reproduce this by just creating a 1 second timer. (I didn't try very hard)
I'm using PySide6 on Windows 11. Here's the version I have:
python -m pip show pyside6 Name: PySide6 Version: 6.8.2 Summary: Python bindings for the Qt cross-platform application and UI framework Home-page: https://pyside.org Author: Author-email: Qt for Python Team <pyside@qt-project.org> License: LGPL Location: C:\Users\Michael.Barth\AppData\Local\Programs\Python\Python312\Lib\site-packages Requires: PySide6-Addons, PySide6-Essentials, shiboken6 Required-by:
Am I misunderstanding something/doing something wrong?