Questions tagged [pyside6]

Questions about using PySide6, a Python Qt bindings project for Qt6.

Links

757 questions
8
votes
3 answers

"Environment variable PYSIDE_DESIGNER_PLUGINS is not set, bailing out."

I have installed open source qt creator (free version) and creating very simple desktop application. I am able to create simple window but when I am running I am getting following error: I have tried to follow this page but could not understand to…
user765443
  • 1,856
  • 7
  • 31
  • 56
7
votes
2 answers

PySide6: Signals not included in typing files? (QtCore.pyi etc.)

Consider the following minimal working example: #!/usr/bin/env python3 from PySide6.QtCore import QTimer from PySide6.QtWidgets import QLabel, QApplication app = QApplication() label = QLabel('Label') x = 0 def timeout(): global x x += 1 …
Philipp Burch
  • 869
  • 1
  • 7
  • 16
6
votes
2 answers

MyPy complains about Qt.AlignmentFlag

When I upgrade to PySide6 6.2.2, MyPy starts complaining about Qt.AlignmentFlag. Here's a small example: from PySide6.QtGui import Qt from PySide6.QtWidgets import QLabel, QApplication app = QApplication() label = QLabel("Hello,…
Don Kirkby
  • 53,582
  • 27
  • 205
  • 286
6
votes
1 answer

Metaclass conflict when trying to create a Python abstract class that also subclasses a PySide6 class

I'm trying to create an abstract base class that also inherits an arbitrary PySide6 class. However, the following produces the error TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses…
physhics
  • 61
  • 4
5
votes
2 answers

How do I use QT6 Dark Theme with PySide6?

Simple demo application I am trying to set the theme to dark. I would prefer a code version (non QtQuick preferred), but only way I see for Python is with a QtQuick config file, and even that does not work. from PySide6 import QtWidgets from PySide6…
CasualDemon
  • 5,790
  • 2
  • 21
  • 39
5
votes
3 answers

After upgrading PySide6 gives error No module named 'PySide6.QtWidgets'

After upgrading to PySide6.3.0 getting error ModuleNotFoundError: No module named 'PySide6.QtWidgets' source import sys from PySide6.QtWidgets import QApplication, QLabel app = QApplication(sys.argv) label = QLabel("Hello…
Udesh
  • 2,415
  • 2
  • 22
  • 32
5
votes
2 answers

ModuleNotFoundError: No module named 'PySide6' in Python using Visual Studio Code

*** Update *** This issue was solved by whiteroom in the comments section. The issue was that the Python Interpreter setting needed to be changed to point to the correct one. The whiteroom question answer was also very helpful. *** Original Question…
Emad-ud-deen
  • 4,734
  • 21
  • 87
  • 152
5
votes
2 answers

Using GraphicalEffects in PySide6

I am using PySide6 and am trying to use the GraphicalEffects module. As per documentation here: https://doc.qt.io/qt-6/qtgraphicaleffects5-index.html I am doing: import Qt5Compat.QtGraphicalEffects The error I am…
Aaron
  • 759
  • 1
  • 7
  • 15
5
votes
1 answer

Running PySide6 and GPIO on Raspberry PI 4

Recently I have bought a brand new Raspberry Pi 4B with 8Gb RAM and installed Ubuntu Desktop 21.04 there. My goal is to create a GUI on a touchscreen which controls GPIO pins (some hardware devices). Since controlling GPIO is done by Python I would…
supercolo
  • 171
  • 1
  • 8
5
votes
1 answer

Signals in Pyside6

I can't figure out why the signals don't work. In PyQt5, this code worked (the difference was that instead of Signal, it was pyqtSignal). When you click on the button, TextEdit should display the message "connecting to the device", if you replace…
Mikhail Drozdov
  • 53
  • 1
  • 1
  • 5
5
votes
2 answers

How does the new snake_case feature work in PySide6?

I'm upgrading from PySide2 version 5 to PySide6, and the release notes say that it supports snake-case method names as well as replacing getter and setter methods with properties. That sounds like a big improvement, but I can't figure out how to…
Don Kirkby
  • 53,582
  • 27
  • 205
  • 286
5
votes
2 answers

Create a Transparent Blur Window

I am using Python 3.9.1 and PyQt6. Now I want to create a window with blurred background, which should look something like below: Blurred Window Background Demo It would be helpful if anybody provide me a code for this.
4
votes
2 answers

Why do similar signal/slot connections behave differently after Pyqt5 to PySide6 port

I'm porting a pyqt5 GUI to pyside6 and I'm running into an issue I don't understand. I have two QSpinboxes that control two GUI parameters: One spinbox controls the weight of a splitter, the other controls the row height in a QtableView. This is the…
mahkitah
  • 562
  • 1
  • 6
  • 19
4
votes
1 answer

PySide6 app crashes when using QPainter.drawLine()

On Windows 10, python3.10, PySide6 (or PyQt6) QApplication crashes when calling QPainter.drawLine() . The terminal just displays : Process finished with exit code -1073741819 (0xC0000005) Please find below the code: import sys from PySide6.QtCore…
u2gilles
  • 6,888
  • 7
  • 51
  • 75
4
votes
1 answer

Why wayland and xorg appearance of Qt6 are different?

I'm trying to use Qt to make a very simple window. My goal is to obtain something that looks like a native OS window (with the least effort), nothing more, but if possible nothing less. In order to make it easier, I'm using Qt python bindings, and I…
Annibale
  • 241
  • 3
  • 6
1
2 3
50 51