ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

сообщение · 2022-01-05 15:12 UTC
K
Replymessage unavailable
Yes. We discussed this a while back. There is an object you need to instantiate (that automatically happens for a C++ project) before qml debugger can work. Then you can attach to your app from Qt Creator. Here's the magic you need to add to your python entrypoint file: At the top add this import: from PySide2.QtQml import QQmlDebuggingEnabler Then in your if __name__ == "__main__":, instantiate a QQmlDebuggingEnabler - doesn't matter that it doesn't get used, so you will need to shut up pylint if you use that.: debug = QQmlDebuggingEnabler() # pylint: disable=unused-variable Then, when you launch your app, pass -qmljsdebugger=port:10002,block on the command line. (Do make sure that QApplication receives sys.argv, or this will have no effect) Then, when you launch the app, it will pause waiting for the debugger when the QML engine starts. — Then in Qt Creator, in the debug menu, choose the Debug->Start Debugging->Attach to QML Port menu item. Match the port defined above (10002), pick a Qt Kit that matches what is used in the PySide version you're using (better, create a kit that points into the site-packages/PySide2(/6) dir (I think that will work) - then it will use the exact build. I think it uses it just to access the qml dir to find the QML files - but not entirely sure.

All messages on 5 January 2022 · Whole feed · оригинал в Telegram

Open in Telegram Каталог площадок Искать в ChatCrawler

A snapshot of an open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog