Questions about using PySide6, a Python Qt bindings project for Qt6.
Questions tagged [pyside6]
757 questions
1
vote
0 answers
How to properly implement if the cursor is hovered over QGroupBox to do something?
import sys
from PySide6.QtWidgets import (
QApplication,
QWidget,
QVBoxLayout,
QGridLayout,
QGroupBox
)
class EmailBox(QWidget):
def __init__(self) -> None:
super().__init__()
self._emailbox_layout =…

relu
- 11
- 2
1
vote
0 answers
How to make QListView::item:first and QListView::item:last with round corners
I've tried to make QMenu and QComboBox item's corners rounded. And i have a result. But i can't force only first and last items become rounded.
So, it should look like this:
.
But with this code below i can only round all items.
I've tried to call…

Mika
- 51
- 4
1
vote
1 answer
App symbol for PySide6 not showing in file explorer
Having a PYSide6 app with icons defined:
self.window.setWindowIcon(QIcon("icons/icon.ico"))
app.setWindowIcon(QIcon("icons/icon.ico"))
The icons show up almost everywhere, in the top bar of the window, the taskbar in windows etc.
Just the…

Peter Baintner
- 21
- 3
1
vote
0 answers
How to implement resizable rectangle in PySide6 QGraphicsView
I am trying unsucessfully to implement a resizable rectangle QGraphicsItem in the pyside6 QGraphics framework by inheriting from QGraphicsRectItem. In the ResizableRectItem class, I create resize handles that are themselves QGraphicsRectItems and…

sunnytown
- 1,844
- 1
- 6
- 13
1
vote
1 answer
Unexpected freezing of graph while GUI still works and without error message | Pyside6 and pyqtgraph with multi-threading (Python 3.11.4)
Goal:
I'm creating a GUI that will be used for displaying input from a sensor on a graph. To make this repeatable and intuitive I've replaced any input from the sensor with a simple sinus function. The program, when run, displays one window with two…

Batmannilsson
- 11
- 3
1
vote
1 answer
Pyside6: Copy paste, delete, undo of multiple cells to and from QTableWidget
I want to be able to copy and paste to and from a Pyside6 table (QTableWidget) with control-C control-V, mainly from and to Excel.
I found @Momo's post of January 2023. 1
That did not appear to work for me, possibly because I am working with Pyside6…

ROB
- 181
- 2
- 12
1
vote
2 answers
Can someone explain how QGraphicsItems interact with QGraphicsScene coordinates? (PySide6)
I am confused by Qt's coordinate handling in a QGraphicsScene. I'm using PySide6, and create a QGraphicsScene with movable QGraphicsRectItems. I would like to limit the items to the boundaries of the scene. There is an example in the PySide docs,…

A Humble Supplicant
- 77
- 1
- 7
1
vote
0 answers
Outputting video to a window with rounded corners in PySide6
When creating a graphical interface using QT Designer and the PySide6 library, I needed to output video to one of the interface windows created in QT Designer as QVideoWidget. Here is a program snippet that successfully performs this function:
def…

MagSus
- 11
- 2
1
vote
1 answer
How to resolve "Error 0x80070057: The parameter is incorrect" in PySide6 + Qt3D?
When I try to run the code below, which just attempts to draw a single line, I get the following error:
Qt3D.Renderer.RHI.Backend: Initializing RHI with DirectX backend
Failed to create input layout: Error 0x80070057: The parameter is…

Ross
- 186
- 1
- 6
1
vote
0 answers
How can i relate a checkbox whit an Id in a Qtable Widget
In my program i have,this page with two tables like this:
And everytime e checked one row, the row pass to the table above.
What i want to know if is one way to relate the IdTeste with the checkbox because in the table above i will need the Id to…

ANDRE SA
- 23
- 4
1
vote
0 answers
What is the easiest way to set data of a QTreeWidget from a numpy array?
Tried:
def setTreeValues(self, data: [numpy.array]) -> None:
"""
ARGS:
ID signals sum_errors max_error number_errors status
(int) (str) (float) (float) (int) …

Ehab Abdelkarim
- 11
- 3
1
vote
0 answers
Signal/Slot problem with PySide6 (but not with PyQt6)
Consider the following code where clicking a button is closing the parent window.
Using PyQt6, the parent window of the button clicked is closed.
But with PySide6, the window 1 is always closed, whatever the button clicked.
I cannot figure out what…

kleio12345
- 13
- 3
1
vote
0 answers
How can I set QTreeView's current index to a specific value in PyQt6 or PySide6?
i use this offical example https://doc.qt.io/qtforpython-6/examples/example_widgets_itemviews_jsonmodel.html
then i want to make vaule be clicked in QTreeView by a specific value。like this
enter image description here
maybe it means update…

UnderHeart
- 11
- 1
1
vote
1 answer
PySide6 plugin erorr (xcb)
I install Linux Mint and rise erorr when start application with PySide6:
`qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized.…

MasterShifu
- 61
- 4
1
vote
1 answer
Drag and Drop TreeWidget
I'm trying to make a treewidget that can change children between parents with the drag and drop method, but a children can never be turned in a parent.
Right now this is my class:
class Tree(QTreeWidget):
def __init__(self, parent=QWidget):
…

Shadow
- 65
- 8