Skip to content

Qt for Python

For discussion and questions about Qt for Python (PySide & Shiboken)

3.3k Topics 14.6k Posts
  • Need some help migrating code from PySide2 to PySide6 (SideFX decided to update)

    Unsolved
    2
    0 Votes
    2 Posts
    26 Views
    SGaistS
    Hi and welcome to devnet, I think you are looking for QGuiApplication.screenAt. QApplication is a subclass so you can directly use it with it.
  • Using QTimer.SingleShot to Report Minimizedness Gets the State Wrong

    Unsolved
    9
    0 Votes
    9 Posts
    209 Views
    SGaistS
    For the package, there's likely an ARM version available. The thing is: it might be a wayland issue it might be a composer issue it might be a Qt/KDE issue
  • If I want to adhere to the platform styles, what's the best Qt stack?

    Solved
    3
    0 Votes
    3 Posts
    105 Views
    RokeJulianLockhartR
    @JKSH, thank you. post/744511 explains well how to code for this.
  • How to report issues with Qt documentation?

    Unsolved
    5
    1 Votes
    5 Posts
    756 Views
    RokeJulianLockhartR
    @Alhazred, they appear to all be Python now: [image: 15ef3bc4-ae26-458e-aef6-1f2d7d87fb4f.png]
  • Protecting the source code from reverse engineering

    Unsolved
    3
    0 Votes
    3 Posts
    42 Views
    SGaistS
    Hi, In addition to @hskoglund, Nuitka commercial seems to also offer that service. However I can't comment on it as have not used it.
  • PySide6 and Nuitka Commercial

    Solved
    3
    0 Votes
    3 Posts
    65 Views
    A
    @SGaist Hi, ok, thank you. If I do not report back, assume it worked like the non-commercial version.
  • resizing columns in headers with checkboxes

    Unsolved
    3
    0 Votes
    3 Posts
    63 Views
    K
    @JonB Thanks for the suggestion. That kinda seems to work and the checkbox is no longer overlapped with the text, but the resizeColumnstoContents() still seems to be taking into account of only the size of the text and I'm not sure how to recalculate that as I dont see sectionSizeHint() or sectionSize() being called. I added this right before the super() call: if logicalIndex in self.checkboxes: rect.adjust(23, 0, 0, 0) [image: 28b099a9-8165-4bc2-9547-74044338bd8e.png]
  • QApplication.screens() with two laptops connected to the same monitor

    Solved
    3
    0 Votes
    3 Posts
    94 Views
    D
    It shows both monitors in Windows Display settings as well.
  • 0 Votes
    2 Posts
    239 Views
    A
    This is exactly what I was looking for recently, and sadly I couldn’t find one either. However, you can integrate your own widgets into Qt Designer by creating a custom widget plugin. Qt Creator even provides a boilerplate project template for this in C++ (I’m not sure yet on the PySide process), so it’s pretty easy to get started. Once built, your plugin will appear in Designer just like the default widgets. [image: 51bfaceb-03f2-4bc9-9415-9cc26ffb1cfb.png] I recently built one myself in C++ for another project using Fluent UI–style widgets. The repo’s here if you’d like to take a look: https://github.com/alviansm/QtFluentWidgetPlugin. [image: 15bcfce7-11db-4258-80bd-c12df69115fa.png]
  • How to show a QChartView embedded in a QDialog

    Unsolved
    2
    0 Votes
    2 Posts
    68 Views
    JonBJ
    @Josef-Michael-Laub You should just put a layout (e.g. QHBoxLayout or QVBoxLayout) on the QDialog (via setLayout()) and then add the QChartView onto that (via addWidget()), just like adding any QWidget onto any other QWidget. About the only addChild() I know of is in QTreeWidgetItem and that is nothing to do with your situation.
  • pyqt5,Curve rendering error

    Solved
    3
    0 Votes
    3 Posts
    97 Views
    Q
    @SGaist said in pyqt5,Curve rendering error: Hi and welcome to devnet, Without any code to reproduce that, there's only a very slight chance someone can guess what might be going on. Please provide a minimal script that shows this issue. Thanks, I have found the solution:When using a new brush, the program needs to set setBrush(Qt.NoBrush)
  • 0 Votes
    2 Posts
    73 Views
    F
    What Python version are you using? Starting from 3.11, tomllib is used which should be able to handle it. For older versions, a manual parser is used, which may fail.
  • 0 Votes
    5 Posts
    221 Views
    transistxrT
    @friedemannkleint This did not work either, although I wasn't getting any errors as such
  • 0 Votes
    1 Posts
    66 Views
    No one has replied
  • NotImplementedError: QAsyncioEventLoop.getaddrinfo() is not implemented yet

    Unsolved
    2
    1 Votes
    2 Posts
    330 Views
    R
    Yes, I also encountered that. Sadly, that's exactly what it means: PySide's asyncio event loop does not implement getaddrinfo: https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/pyside6/PySide6/QtAsyncio/events.py#n552 In fact, none or almost none of the IO-related methods are implemented. Documentation also says that directly at https://doc.qt.io/qtforpython-6/PySide6/QtAsyncio/index.html: We consider that this API consists of two levels: Fundamental infrastructure for event loops and asynchronous operations, including futures, tasks, handles, executors, and event loop management functions (see below). A user-facing API for use in applications, including transports and protocols, network connections, servers, sockets, signals, subprocesses. QtAsyncio currently covers the first level.: One solution is to use trio in guest mode, like in this example: https://doc.qt.io/qtforpython-6/examples/example_async_minimal.html. Except it will not help you, because LangChain does not support trio. There are a few libraries that implement a similar capability for asyncio, but none of them seem particularly mature.
  • Using Regular Asyncio APIs with QtAsyncio Event Loop

    Unsolved
    4
    0 Votes
    4 Posts
    185 Views
    SGaistS
    Ok, I better understand your issue. I am currently wondering whether QtAsyncio should have followed more closely that design.
  • Communication between ui.qml, .qml and .py

    Unsolved
    3
    0 Votes
    3 Posts
    194 Views
    Q
    It seems to me that the @QMLElement would be necessary to introduce new elements to QML. My problem is the communication between the ui.qml (only geometry, rectangles, buttons) from Qt Design Studio and the .qml (events, signals for buttons, radiobuttons,...) e.g. from Qt Creator. I don't know how to refer/connect the objects in ui.qml to/with the associated events in .qml, I guess. Button with id=button1 in ui.qml and on the other hand button1.onClicked in .qml, how can I address to button1 from ui.qml to qml?
  • Pyside6 failed in python 3.11 embedded version

    Solved
    8
    0 Votes
    8 Posts
    333 Views
    T
    The problem had been solved,my windows version does not match minimal requirements
  • shiboken6.exe crashing

    Unsolved
    13
    0 Votes
    13 Posts
    876 Views
    SGaistS
    Sorry I don't have a Windows machine at hand, I also tried on Linux with Python 3.13.5 and a fresh install of shiboken-generator (6.9.1 at the time of writing) and it all worked well. How did you setup Python on Windows ?
  • Design mode does not work for Qt for Python Qt Quick App

    Unsolved
    4
    0 Votes
    4 Posts
    176 Views
    P
    @jsulm Probably Project screenshot will also be helpful [image: a61b54a7-05a5-43fb-90bc-4f777306a77f.png]