Skip to content

Qt for Python

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

3.4k Topics 14.9k Posts
Qt 6.11 is out! See what's new in the release blog
  • New Update of Qt Creator causes problem with PyQt6.uic

    Unsolved
    5
    0 Votes
    5 Posts
    4k Views
    B
    sudo apt install pyqt6-dev-tools solved it for me on Ubuntu.
  • PySide6 QtOpcUa contribution

    Unsolved
    3
    0 Votes
    3 Posts
    225 Views
    F
    The bindings for QtOpcUa, QtMqtt and QtCoap are provided for commercial license owners as part of the commercial offering. So, the contribution can unfortunately not be accepted.
  • pyside6-deploy failing on macOS

    Unsolved
    2
    1 Votes
    2 Posts
    251 Views
    S
    seems like an issue with Nuitka. I created a bug here - https://qt-project.atlassian.net/browse/PYSIDE-3312 in Qt for Python, but this actually would need a bug to be filed in Nuitka which i can do soon.
  • PySide 6.11 Build issue on macOS

    Solved pyside qt for python
    3
    0 Votes
    3 Posts
    2k Views
    F
    See PYSIDE-3286 for reference.
  • PySide6 QMenuBar Issue on MacOS

    Solved
    4
    0 Votes
    4 Posts
    319 Views
    SGaistS
    Hi and welcome to devnet, macOS has certain rules (as other OS do as well) to have a consistent user experience and Qt helps to put things into the right place automatically. For example, the settings are under Preferences in the application's name menu. User don't have to hunt down for these kind of things. On macOS the default QMainWindow menu bar is indeed at the top of the screen which is normal and expected. Taking a look at your code and the picture you posted, I would suggest to redesign things a bit. For example, having the dark/light theme switch under Help is rather unexpected.
  • Use an asyncio loop at the same time as a PySide application

    Unsolved
    2
    0 Votes
    2 Posts
    242 Views
    SGaistS
    Hi, Did you check the Eratosthenes example ? It used the QtAsyncio.run method to start the event loop and asyncio integration. When reading the example, check that you have the asyncio implementation shown as there are two different implementations shown. Hope it helps
  • odd error Parenting and QGraphicsScene coordinate transforms

    Unsolved qt for python pyside
    1
    0 Votes
    1 Posts
    119 Views
    No one has replied
  • 0 Votes
    2 Posts
    535 Views
    G
    This eventually turned out to be an unneeded call in the parent.paint, which got very confused when the item had been deleted. Keeping everything clean and as simple as possible helps.
  • Suggestion: Add [tool.pyside6-deploy] in pyproject.toml for pyside6-project

    Solved pyside
    2
    0 Votes
    2 Posts
    204 Views
    SGaistS
    Hi and welcome to devnet, You should open a feature request on the bug report system. That will be the right place to discuss this kind o things. This forum is more user oriented.
  • PyQt6 QWebEngineView unintended content replacement with index of location

    Unsolved qt for python
    1
    0 Votes
    1 Posts
    190 Views
    No one has replied
  • QtQuick3D point/line size

    Unsolved
    3
    1 Votes
    3 Posts
    811 Views
    X
    Now I'm working on drawing a vertices cloud for a model imported from polygon, and I was puzzled about this issue as well. I've tried changing point size in .vert file, but no effect actually. Anyway, shader files in Qt are seriously hard to compile successfully.
  • Drawing LaTeX image in pyside6 using TextObject

    Unsolved
    3
    0 Votes
    3 Posts
    299 Views
    JonBJ
    @pasmon90 said in Drawing LaTeX image in pyside6 using TextObject: I need python equal or greater than .12 for gemini api feature So i cannot use pyqt6 as it does not get install. I know nothing about your situation. But if you are saying that PyQt6 would work, or is at least worth trying to compare against PySide behaviour, have you tried running PyQt6 with whatever 3.12/3.13 version of Python, regardless of whether PyQt6 is supplied with an older version of Python?
  • Combobox no dropdown under Debian

    Unsolved
    3
    1 Votes
    3 Posts
    327 Views
    S
    Thank you for the warm welcome! I use this QT-version: Name: PySide6 Version: 6.7.2 Summary: Python bindings for the Qt cross-platform application and UI framework Home-page: Author: Author-email: Qt for Python Team <pyside@qt-project.org> License: LGPL Location: /home/pi/.local/lib/python3.11/site-packages Requires: PySide6-Addons, PySide6-Essentials, shiboken6 Required-by:
  • PyQt

    Unsolved
    6
    0 Votes
    6 Posts
    475 Views
    JonBJ
    @J.Hilk said in PyQt: I know I don't like that as well, but at least it reduced the confusion between Qt and QtCreator versions by an order of magnitude in posts here on the platform Not sure what you mean. I started at Qt5 a few years ago. We are now at Qt6. Meanwhile Creator went from something like major version 4 to major version 19, or thereabouts. I can't really see much has even changed in it (at least for my usage; and for me it has about the same number of major bugs/annoyances as it did at version 4, no improvements in lots of those). Certainly not enough to justify ~15 major version increments. If this were any other product than Qt, which I do love, I would not touch it with a bargepole if it need to undergo so many, frequent major version numbers.
  • Failing to build PySide 6.9.2 in debug

    Solved
    5
    0 Votes
    5 Posts
    1k Views
    SGaistS
    Thank you ! :-)
  • Do I need to add qmldir for python objects exposed as singleton instances?

    Unsolved
    5
    0 Votes
    5 Posts
    488 Views
    M
    @JKSH I am trying to go through your answer step by step going from the simplest case and adding complexity. I am trying to use the decorators as you mentioned but I still cant get the qmllint or the language server to recognize my python types. The code works but in my qml file I will get a warning that the module can not be imported. @JKSH said in Do I need to add qmldir for python objects exposed as singleton instances?: In addition to QML instantiation, these decorators automatically generate the qmldir + *.qmltypes files. These files are read by qmllint and the QML Language Server (qmlls) to understand your Python types. I am not sure how adding a decorator to my class can generate these files so the language server can recognize the types. I feel like I am missing something here related to the qt tools provided for python but I cant see what. Going through the documentation I have tried to use pyside6-project build but nothing really happens even if I dont get any errors. I tried using pyside6-project qmllint and get the same warnings. My qml file and the .py file where the @QmlElement decorated class lives have been added to the pyproject.toml. Still not *.qmltypes are generated in this process. Information about these tools seems scarce so I am wondering if I am missing something.
  • Play multiple mp3 files with QMediaPlayer

    Solved
    3
    0 Votes
    3 Posts
    323 Views
    M
    I found a solution, it involves in connecting the signal "playingChanged" of QMediaPlayer to a function that plays the next track. self.player=QMediaPlayer() self.audioOutput = QAudioOutput() self.player.setAudioOutput(self.audioOutput) self.player.playingChanged.connect(self.play_next) def play_next(self): if self.player.playbackState()!=QMediaPlayer.PlaybackState.PlayingState: self.player.setSource(QUrl.fromLocalFile("next_track.mp3")) self.player.play()
  • I found an error on the PySide6 documentation website.

    Unsolved
    3
    1 Votes
    3 Posts
    394 Views
    F
    Yes, https://codereview.qt-project.org/c/pyside/pyside-setup/+/718662
  • Organization of QML tests

    Unsolved
    1
    0 Votes
    1 Posts
    135 Views
    No one has replied
  • 0 Votes
    2 Posts
    237 Views
    JKSHJ
    Hi, and welcome! @Sneako said in Qt Creator Designer "Line: 0: The Design Mode requires a valid Qt kit." with Kit installed and code buildable.: Yet designer complains about missing Qt a valid QtKit? Maybe the Qt Quick Designer only recognizes C++ kits. Does the warning disappear if you create a C++ project?