Skip to content

Qt for Python

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

3.3k Topics 14.6k Posts
  • not able to get selection of pdf document

    Unsolved qt for python
    2
    0 Votes
    2 Posts
    622 Views
    F
    The QPdfView widget text selection functionality is currently not completely implemented or has bugs, see for example https://bugreports.qt.io/browse/QTBUG-131443 .
  • 0 Votes
    8 Posts
    3k Views
    F
    You have a mix of PySide6 and PyQt6 here, what are you using, really?
  • Protecting the source code from reverse engineering

    Solved
    4
    0 Votes
    4 Posts
    2k Views
    Axel SpoerlA
    I have used CodeMorpher a while back.
  • Using QTimer.SingleShot to Report Minimizedness Gets the State Wrong

    Unsolved
    12
    0 Votes
    12 Posts
    777 Views
    J
    Thanks for the advice!! In case anyone wants to look at the ticket here it is: https://bugreports.qt.io/browse/QTBUG-139410
  • Need some help migrating code from PySide2 to PySide6 (SideFX decided to update)

    Solved
    5
    0 Votes
    5 Posts
    724 Views
    SGaistS
    Excellent ! Then please mark the thread as solved using the "Topic Tools" button or the three dotted menu beside the answer you deem correct so other forum users may know a solution has been found :-)
  • If I want to adhere to the platform styles, what's the best Qt stack?

    Solved
    3
    0 Votes
    3 Posts
    170 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
    766 Views
    RokeJulianLockhartR
    @Alhazred, they appear to all be Python now: [image: 15ef3bc4-ae26-458e-aef6-1f2d7d87fb4f.png]
  • PySide6 and Nuitka Commercial

    Solved
    3
    0 Votes
    3 Posts
    134 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
    115 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
    135 Views
    D
    It shows both monitors in Windows Display settings as well.
  • 0 Votes
    2 Posts
    290 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
    112 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
    138 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
    112 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
    288 Views
    transistxrT
    @friedemannkleint This did not work either, although I wasn't getting any errors as such
  • 0 Votes
    1 Posts
    99 Views
    No one has replied
  • NotImplementedError: QAsyncioEventLoop.getaddrinfo() is not implemented yet

    Unsolved
    2
    1 Votes
    2 Posts
    377 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
    227 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
    250 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
    387 Views
    T
    The problem had been solved,my windows version does not match minimal requirements