pyside

Connect to DBus signal – Correct syntax – PySide6

Connect to DBus signal – Correct syntax – PySide6 Question: can you help me with the correct syntax to connect to a DBus signal? This is one of my many tries which at least runs and matches the signature in the docs: from PySide6 import QtDBus from PySide6.QtCore import Q from PySide6.QtWidgets import QMainWindow class …

Total answers: 2

Pyside6 get index of dynamically created widget

Pyside6 get index of dynamically created widget Question: I’ve written this simple script(for concept understanding) to better understand how to handle/manage dynamically created combo boxes. So in this example, we have a total of 5 dynamically created combo boxes, each containing a list of 3 variables. When selecting any variable the function comboFunction is run. …

Total answers: 1

Qml QtMultimedia Video + Qml ShaderEffect incompatibility

Qml QtMultimedia Video + Qml ShaderEffect incompatibility Question: I have a problem with applying a shaderEffect on qml video. When I apply ShaderEffect to the rectangle containing a video, I observe stuttering stuttering effect on Video representation in ShaderEffect. Moreover, my program shuts down some time afterwards. Are there ways to apply shader effect to …

Total answers: 2

FileNotFoundError when using py2exe

FileNotFoundError when using py2exe Question: I have a gui program written in Python 3.9 that uses the PySide6 library. I want to make this into a .exe file using py2exe. However, when I try to open the executable I get the error: Traceback (most recent call last): File "main.py", line 3, in <module> File "<frozen …

Total answers: 1

QT QML make invisible button in other Rectangle

QT QML make invisible button in other Rectangle Question: I want to hide the button when navigating from the first page to the second page, But when I add this line button_1.visible: false in the code, it doesn’t work. main.qml: import QtQuick 2.15 import QtMultimedia 5.0 import QtQuick.Controls 2.15 import QtQuick.Dialogs 1.0 import QtQuick.Layouts 1.2 …

Total answers: 2

Change background of model index for QAbstractTableModel in PySide6

Change background of model index for QAbstractTableModel in PySide6 Question: I would like to change the background color of specific index on my table, but only after a specific task is completed. I know that I can use the Background role to change the color in my Table model, but I want to change the …

Total answers: 1

Make PyQt syntax highlighting work when loading from .ui file

Make PyQt syntax highlighting work when loading from .ui file Question: If elements of a PyQt/PySide GUI are defined programmatically, then any IDE can easily understand what they are, do syntax highlighting, show suggested methods etc. For instance, it may look like this in VS Code: However, if the GUI is not defined programmatically, but …

Total answers: 1

When and where to call super().__init__() when overriding QT methods?

When and where to call super().__init__() when overriding QT methods? Question: When overriding virtual functions of QtWidgets, in which cases should I call super().__init__()? And in which cases does its position make a difference? Example: class Window(QtWidgets.QMainWindow): def keyPressEvent(self, event: QtGui.QKeyEvent) -> None: """Variant A: Top""" super().__init__(event) # my code def mousePressEvent(self, event: QtGui.QMouseEvent) -> …

Total answers: 1

thread communication, stop the work of a thread until data is entered PySide

thread communication, stop the work of a thread until data is entered PySide Question: I’ve written a simple window with a start button that starts a Qthread. After a few instructions in the thread, I would like to display a SubWindow using Signal. Unfortunately, Qthread does not stop after displaying subWindow. I’m looking for a …

Total answers: 1

QML – Switch button is controlled by spacebar – why?

QML – Switch button is controlled by spacebar – why? Question: In my Pyside/QML application I want to use spacebar onPressed event for my purpose – it works. When add to my app Switch button, then the spacebar button controls the Switch instead of calling my onPressed event. Is there any way to disable the …

Total answers: 2