Skip to content

Qt for Python

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

3.3k Topics 14.5k Posts
  • trying to create a python binding for a C++ Qwidget

    Unsolved
    7
    0 Votes
    7 Posts
    969 Views
    M
    @friedemannkleint hi fried, I have question, does the example's python qwidget able to dock onto a c++ qmainwindow?
  • PySide6, OpenGL, Context Info Example but separate classes for objects

    Unsolved
    3
    0 Votes
    3 Posts
    435 Views
    K
    Please run your app in debugger to see where that happens Dear @jsulm, Thank you for your suggestion. I did execute the application using the debugger; however, it encountered an issue at the first line of the init_gl function, displaying a message indicating "disconnected unexpectedly." Unfortunately, no further information was provided.
  • Why editable QComboBox using pySide6 is not case sensitive?

    Solved
    2
    0 Votes
    2 Posts
    303 Views
    M
    Found solution for this problem! By default, QCompleter object is set to CaseInsensitive and that is what was setting it to the previous entry. With an addition of line like this: self.combo_box.completer().setCaseSensitivity(Qt.CaseSensitivity.CaseSensitive) things are working correctly!
  • 0 Votes
    1 Posts
    189 Views
    No one has replied
  • pyside6-rcc generating different output on different PCs

    Solved qt for python python
    9
    0 Votes
    9 Posts
    713 Views
    F
    We actually provide a tool, pyside6-project , which defines a simple project file format and can do these steps automatically and can also be opened in Qt Creator.
  • Preventing GUI freeze while loading a large 'library' widget

    Solved
    14
    0 Votes
    14 Posts
    934 Views
    JonBJ
    @RemDup The alternative way which should work is not to load the stacked widget initially. Show the main window and set off a 0 duration singleshot timer before entering the main event loop. In the slot, which will be run just after the main window (or whatever) is shown, create and load the other widgets.
  • 0 Votes
    1 Posts
    153 Views
    No one has replied
  • Table view in qt quick with Python

    Unsolved
    3
    0 Votes
    3 Posts
    403 Views
    I
    @friedemannkleint The data that the model provides is not displayed in the tableview. When button is clicked, it should be emitting signal with the model that carries the data, so model=null is turned into model=actual data, then the data should be displayed on tableview. As you can see I've left part of the TableView block empty so someone could suggest the solution to this.
  • QtAsyncio handle_sigint QDockWidget Timer Issue?

    Unsolved pyside
    1
    0 Votes
    1 Posts
    180 Views
    No one has replied
  • Is there a workaround for retrieving/creating a QPainterPath from existing widgets?

    Unsolved
    1
    0 Votes
    1 Posts
    171 Views
    No one has replied
  • How to implement tabBar and tabButtons

    Unsolved
    2
    0 Votes
    2 Posts
    309 Views
    A
    show your code. or record screen shot or video,
  • qmenu black mark in corner . how to remove it

    Moved Solved
    7
    0 Votes
    7 Posts
    556 Views
    A
    thanks it works closely but not perefect solution because few black pixels are still visible in edges.but its negligible [image: 73c9289a-9cb8-4d9d-be34-0ee636ef7ac5.png]
  • Explicitly setting `DockWidgetFeature` properties disables those properties.

    Solved
    5
    0 Votes
    5 Posts
    349 Views
    RokeJulianLockhartR
    @Pl45m4, thanks. That works: #!/usr/bin/env python3.13 main_content_dock.setFeatures( PyQt6.QtWidgets.QDockWidget.DockWidgetFeature.DockWidgetClosable | \ PyQt6.QtWidgets.QDockWidget.DockWidgetFeature.DockWidgetFloatable | \ PyQt6.QtWidgets.QDockWidget.DockWidgetFeature.DockWidgetMovable )
  • Why is my `HLine` `QFrame` invisible (inside my `QDockWidget`)?

    Solved
    2
    0 Votes
    2 Posts
    310 Views
    RokeJulianLockhartR
    I'm stupid. It's because it was a 0-width HLine. Changed to VLine; worked.
  • QT Quick with python

    Solved
    8
    1 Votes
    8 Posts
    628 Views
    I
    I think I finally understand how .ui.qml, .qml and python backend should work together when working with QDS project. Way I did this was to export component ID as property alias in QDS by clicking @ sign, as shown on screenshot: [image: 9db015ee-13e0-4bbe-9cc7-0999fc6bfab1.png] Then this alias should be used in .qml files, such as App.qml in order to access the component in .ui.qml (This was the biggest confusion point for me). Then we can use signals and slots to connect components with backend as usual. I created a minimal example and can be seen here in case anyone has same issue. https://github.com/irakliskhirtladze/QML-Demo
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • Using nuitka to generate exe file

    Unsolved
    2
    0 Votes
    2 Posts
    262 Views
    jsulmJ
    @Mahdi_2020 You could simply use https://doc.qt.io/qt-6/resources.html
  • Dynamic Image Scaling Widget

    Unsolved
    5
    0 Votes
    5 Posts
    548 Views
    JonBJ
    @andrei_cp Maybe your resetting the pixmap to a new size in resizeEvent() in turn causes a new size event, and a bit bigger than before? That is the recursion. In any case I imagine you want to use @friedemannkleint's suggestion, then you only need the label to resize, see if that helps.
  • 0 Votes
    4 Posts
    311 Views
    F
    QGuiApplication is a bit smaller...
  • Avoid unnecessary repaints

    Unsolved
    2
    0 Votes
    2 Posts
    277 Views
    JoeCFDJ
    You may try: get visial rect of the item QRect QTableWidget::visualItemRect(const QTableWidgetItem *item) const update it only void QWidget::update(const QRect &rect) check here out https://www.qtcentre.org/threads/1032-repaint-a-cell-or-row-in-QTableWidget