Skip to content

Qt for Python

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

3.3k Topics 14.6k Posts
  • Issues with link switching via keyboard in QPlainTextEdit

    Unsolved
    6
    0 Votes
    6 Posts
    157 Views
    W
    @jeremy_k said in Issues with link switching via keyboard in QPlainTextEdit: Have you considered QTextBrowser? It has link handling APIs, and tab navigation between links works. I was hoping to avoid having to use a different widget since I've already built most of my app around the QPlainTextEdit. Besides, I vastly prefer its scrolling behavior. QTextEdit and QTextBrowser both cut off the text when the user scrolls past it, leaving it partially visible at the top of the window. QPlainTextEdit doesn't. It's a nice visual feature that makes the app feel much smoother. Switching to QTextBrowser seems like a viable solution, though I'll have to modify my existing code to work with it. I would prefer to keep the QPlainTextEdit scrolling behavior somehow if possible. Is there any particular reason why that flag doesn't work with QPlainTextEdit?
  • Is building for iOS supported?

    Unsolved
    11
    0 Votes
    11 Posts
    1k Views
    P
    @friedemannkleint said in Is building for iOS supported?: See https://bugreports.qt.io/browse/PYSIDE-2352 for reference. Contributions are very much welcome. I replied in that jira ticket asking where to find information to evaluate lift for contribution but never received a response. I also see there has been some recent mention of iOS in the Qt for Python meeting notes. How can I find out more or contact the developer involved in this effort? @CristianMaureira said in Is building for iOS supported?: Externally, no, but you can always follow the meeting notes: https://wiki.qt.io/Qt_for_Python_Development_Notes you can see iOS support is being actively investigated. Same question here
  • Updating to 6.9.1 breaks code which work under 6.9.0

    Unsolved
    6
    1 Votes
    6 Posts
    876 Views
    E
    Has 6.9.2 resolved this issue? I no longer have the code I could have used to test this.
  • DLL Problems - DLL load failed -> QtCore

    Solved
    3
    0 Votes
    3 Posts
    63 Views
    B
    Found the solution. PyQt6 6.9.1 is not compatible with Python below 3.10. Updating python version helped. Leaving for the future researchers.
  • How to disable a QAction when variable x is equal to y?

    Solved
    4
    0 Votes
    4 Posts
    152 Views
    W
    Thanks for the help. I ended up just checking the variable inside the function the action triggers so it gets disabled as needed when it's used. It's working perfectly now.
  • Can't load external themes when using PySide6

    Unsolved
    6
    0 Votes
    6 Posts
    914 Views
    J
    @SGaist Hmm... interesting. Will look into that.
  • not able to get selection of pdf document

    Unsolved qt for python
    2
    0 Votes
    2 Posts
    1k 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
    1k 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
    948 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
    227 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
    804 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
    191 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
    157 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
    183 Views
    D
    It shows both monitors in Windows Display settings as well.
  • 0 Votes
    2 Posts
    334 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
    139 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
    173 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
    145 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.