Skip to content

Qt for Python

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

3.4k Topics 15.1k Posts
Qt 6.12 LTS is out! See what's new in the release blog
  • PySide6 6.8.3 Windows wheels — corresponding source and bundled third-party libraries

    Unsolved
    2
    0 Votes
    2 Posts
    50 Views
    jsulmJ
    @haonan-build Not sure you will get an answer here, because this is user forum
  • PySide 6.10.0-6.10.1 upgrade changed my padding on Windows, how to restore?

    Unsolved
    7
    0 Votes
    7 Posts
    395 Views
    A
    Whoops, didn't realize that the windowsvista theme didn't support dark mode. https://www.qt.io/blog/dark-mode-on-windows-11-with-qt-6.5 Going to need to figure out how to fix the padding now.
  • QWidget modification at runtime

    Unsolved
    19
    0 Votes
    19 Posts
    1k Views
    Christian EhrlicherC
    @SamuraiDestroy said in QWidget modification at runtime: but the size and positioning of some widgets is off Then you still miss some layouts.
  • 0 Votes
    1 Posts
    48 Views
    No one has replied
  • Can qhelpgenerator be included in the PySide distribution?

    Unsolved
    2
    0 Votes
    2 Posts
    87 Views
    SGaistS
    Hi, I think you should open a feature request on the bug tracker to discuss this. This forum is more user oriented.
  • 0 Votes
    3 Posts
    163 Views
    JKSHJ
    I don't know the exact tag/commit that was used for this release, but this is what I know: Qt WebEngine (and Qt PDF) have been split from Qt, with an independent release cycle: https://www.qt.io/blog/qt-webengine-will-release-separate Qt WebEngine/PDF 6.140.0 has not been released yet Qt for Python has not performed the same split yet; Qt for Python 6.12.0 inadvertently shipped with a pre-release version of Qt WebEngine/PDF I believe this should be rectified soon
  • Managing multiple windows

    Unsolved
    1
    0 Votes
    1 Posts
    69 Views
    No one has replied
  • PySide6 UI looks different depending on which macOS built Python

    Solved
    8
    0 Votes
    8 Posts
    416 Views
    SGaistS
    Is that white background different in other apps ?
  • QMessageBox crash on macOS 27.0.1

    Unsolved
    7
    0 Votes
    7 Posts
    568 Views
    Q
    Thanks a lot @IgKh for your inputs, it gives some light. Looking for CUINamedVectorGlyph crash with macOS 27 I found indeed a lot of reports, and this seems to be a quite well known issue... It seems the problem could come from a locale not using the period as decimal number separator such as... French locale, which is the setup my users have (comma is used as separator). This could also explain why with a US locale the problem doesn't occur. If you have means to retest my little code above with a French locale on a macOS 27.0.1 system it could be useful to verify. Thanks again.
  • PySide6 6.10.2 Windows MSIX: ICU dependencies, wheel provenance and LGPL redistribution

    Unsolved
    1
    0 Votes
    1 Posts
    166 Views
    No one has replied
  • ModuleNotFoundError: No module named 'PyQt6' using Thonny for Windows

    Unsolved
    2
    0 Votes
    2 Posts
    244 Views
    SGaistS
    Hi and welcome to devnet, I didn't know it's existence so there are a couple of things. You seem to have an existing Python setup on your system, correct ? Thonny comes with its own Python environment if installed through its package. So: How did you install Thonny ? If through its official package, did you install PyQt6 from within the IDE ? If wanting to use your existing Python environment, did you follow the separate install wiki page ?
  • No PyQt5 package for Windows?

    Unsolved
    3
    0 Votes
    3 Posts
    379 Views
    SGaistS
    Hi, PyQt5 is not a product of the Qt Company. You need to contact Riverbank computing about that matter.
  • Selection highlight is a thin blue bar at the left of the cell.

    Unsolved
    15
    0 Votes
    15 Posts
    998 Views
    S
    @Jim-G said in Selection highlight is a thin blue bar at the left of the cell.: So why does setting alternatingRowColors cause the change in highlight? Qt tries to use the OS default widgets first. Alternating row colors is not supported by the OS directly. So, Qt will draw it from scratch and usually tries to mimic the OS look. Seems like it did not get updated, yet.
  • looking for a code editor widget for Qt for Python

    Unsolved
    13
    1 Votes
    13 Posts
    5k Views
    D
    Hi. I made this gizmo https://brainless-software.github.io/qppte/ Not sure if it fits but it works for my use case.
  • Trouble setting up QDataWidgetMapper

    Solved
    9
    0 Votes
    9 Posts
    684 Views
    A
    I did in fact discover that particular quirk while trying to whittle everything down into a MRP! Figured it would be more helpful to just state my finding instead of making folks trudge through the project.
  • Possible mistake in the translation example?

    Unsolved
    7
    1 Votes
    7 Posts
    738 Views
    JKSHJ
    @axu2 said in Possible mistake in the translation example?: The website still isn't updated? The website shows the official documentation of the current release. It will update with the next release.
  • Creating Python bindings for KSyntaxHighlighter with shiboken

    Unsolved
    3
    0 Votes
    3 Posts
    902 Views
    M
    see also: looking for a code editor widget for Qt for Python
  • pyside6-lupdate does not extract translations from Python files when given a directory

    Unsolved
    2
    0 Votes
    2 Posts
    324 Views
    Nils SjobergN
    You need to pass all the .py files in the directory to pyside6-lupdate, or use pyside6-project lupdate.
  • 0 Votes
    13 Posts
    1k Views
    J
    @JonB OK, for future readers here's the code I ended up with. It's a lot simpler than all the hallucinations provided by Google. I'm pretty sure it's not the canonical way to do this but it works and I'll continue studying the links provided in this thread. import sys from PySide6.QtCore import QFile from PySide6.QtWidgets import QApplication, QVBoxLayout, QWidget from PySide6.QtUiTools import QUiLoader def load_ui(ui_file_path: str) -> QWidget: loader = QUiLoader() ui_file = QFile(ui_file_path) if not ui_file.open(QFile.ReadOnly): print("Cannot open ui file") sys.exit(-1) ui = loader.load(ui_file) ui_file.close() return ui class MainWindow(QWidget): def __init__(self, ui:QWidget): super().__init__() self.ui = ui self.setWindowTitle("My Qt Designer App") layout = QVBoxLayout(self) layout.setContentsMargins(0, 0, 0, 0) layout.addWidget(ui) # Load comboBox items #ui.comboBox.addItems(getLoginCandidates(dbEngine)) ui.pushButton.clicked.connect(self.on_submit_clicked) def on_submit_clicked(self): print("The button was clicked!") if __name__ == "__main__": app = QApplication(sys.argv) ui = load_ui("../ui/test.ui") window = MainWindow(ui) window.show() rc = app.exec() sys.exit(rc)
  • Detecting checkbox toggle via keyboard on a QTreeWidgetItem

    Solved
    2
    0 Votes
    2 Posts
    291 Views
    Christian EhrlicherC
    You should get a https://doc.qt.io/qt-6/qtreewidget.html#itemChanged signal when the data of an item changes.