Skip to content
Advertisement

Tag: pyside2

How to deactivate a QVideoProbe?

According to the docs “If source is zero, this probe will be deactivated” But calling setSource(0) gives the following exception: Im running my code on raspberry pi 4 with Rpi Os Bullseye 64bit and PySide2 version 5.15.2. Example code: Answer The source object can be cleared like this: In C++, passing zero to a pointer argument means the function will

Qt – update view size on delegate sizeHint change

I have a QTreeView with a QStyledItemDelegate inside of it. When a certain action occurs to the delegate, its size is supposed to change. However I haven’t figured out how to get the QTreeView’s rows to resize in response to the delegate’s editor size changing. I tried QTreeView.updateGeometry and QTreeView.repaint and a couple other things but it doesn’t seem to

Click a button and change MainWindow

I am learning Qt and I am interesting in how to change some features of MainWindow. I was trying this code, but there were some errors when I clicked the first button: what I did wrong (how could I do ‘the_second_button_was_clicked’ callable )? main.py clickedButton.py Answer The issue has nothing to do with PyQt, but with how classes and instances

How to Access a QT Button (from UI) in Python

I am a beginner in QT. I want to create a simple GUI to load an image from a file. That’s Why I create a button in my GUI, named pushButton (I designed the GUI by QT Creator). Now how can I access the pushButton from my python file? Here is my XML Code (from ui file) Here is My

ImportError while importing PySide2

I installed PySide2 using pip install PySide2 But i got this error when i tried to import it: Answer Have a look at the PyPI documentation here. If that doesn’t help try to use Make sure it is installede in your virtual environtment if you are using that and you are using the correct version of pip(3). Here is a

Advertisement