Relative Content

Tag Archive for pythonpyside6

Button on a page should be in focus during initialization

In the python file, I have declared a main window and 2 child pages. Class UserSetup & class CreateID both have set_button_focus function. When I remove the function from CreateID, only then it works in UserSetup. If I keep it in CreateID and load UserSetup. textbox01 is focused. In both instances, when the child page is loaded, I want the button to be focused.

Add QRadioButtons into a cell of QTableWidget from QT Designer

Following screen capture is a sample code generated from ChatGPT. But I would like to establish the same structure from QT Designer. I cannot find a way to insert radio boxes ‘into’ QTableWidget cells. Is this possible to acheive it in QT Designer?

PySide6 GUI displays differently on different computers

I have a GUI application built in PySide6. Mostly it works fine, but a specific part of it displays differently on different machines: specifically, the text color is white on one machine, but black (as it should be) on every other machine I have tested on. Comparison below:

PySide’s QUiLoader doesn’t show widget

I developed a kinda complex UI in Designer and load this in PySide6 using QUiLoader.
It worked during development, but just when I thought I was finished it doesn’t show anything any more. The scripts starts and runs, it just doesn’t show any window any more.

Pyside6 real-time data from input device; can’t read from iodevice

The code below is supposed to just react on new data coming from input device.
However what is clear from the output, that the method IODevice::read clearly doesn’t grab any data. I tried various options such as io=audio_source.start() and using returned IODevice. This version with buffer and array beneath it show that something is being written, however without hacks it is impossible to obtain it.
I can’t figure out why I can’t read method doesn’t work.

child item is not using parent coordinates

I have a problem with PySide coordinate system. I create a custom item (NodeItem) that inherits from QGraphicsRectItem and is positioned in the scene. This custom item has a child (LabelItem) that inherits from QGraphicsTextItem. When I add the parent item (NodeItem) to the scene is positioned in 150,150 in scene coordinates but the child LabelItem is positioned in scene coordinates not in his parent coordinates (NodeItem).

PySide or PyQt child item is not using parent coordinates

I have a problem with PySide coordinate system. I create a custom item (NodeItem) that inherits from QGraphicsRectItem and is positioned in the scene. This custom item has a child (LabelItem) that inherits from QGraphicsTextItem. When I add the parent item (NodeItem) to the scene is positioned in 150,150 in scene coordinates but the child LabelItem is positioned in scene coordinates not in his parent coordinates (NodeItem).

How to create an advisory or warning message in PySide6

I want to create a notification message. When a button is pressed, a message appears, and it may contain buttons or links
enter image description here
Or a notification like this, for example, that lasts for a few seconds and then disappears
enter image description here

Python PySIde6 QtCore warning in VS code

I am taking my first steps with PySide 6 and i tried some sample code I found in a tutorial. The code works but i get warnings from VS code for some lines:
enter image description here