Skip to content
Advertisement

Tag: qt

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

how to select a particlular portion of a window’s client area to display in window’s thumbnail in the taskbar in Python/PyQt5/PySide2/Tkinter?

I want to set a particular portion(like only a frame or widget) of my application window to taskbar thumbnail.I found one windows API that is ITaskbarList3::SetThumbnailClip here but this is in C++.I want to do this in python.However PyQt5 contains one class that is Qt Windows Extras which doesnot include this function.I have also found something that show one example

Post request by QWebEngineHttpRequest (PyQt5)

I have a question about making POST request in PyQt5. Unfortunately official documentation for this framework for Python doesen’t exist. I have to translate docs from C++ to Python. I have a problem with handle it. To make POST request I have to create instance of class QWebEngineHttpRequest (docs), and then add POST data by setPostData(), it looks to be

Is it possible to paint a QGraphicsItem inside the paint() method?

I’m creating a subclass of QGraphicsItem, and this subclass has different places that the user can click. My idea is for each component clicked to create a subclass of QGraphicsItem with mousePressEvent replaced. The problem is how can I merge this component into a subclass of QGraphicItem. Here’s the code I’m trying, but I do not know how to show

How to delete row/rows from a qtableview in pyqt?

I am using QStandardItemModel for my qtableview. here when I am trying to delete the row selected(i.e. model.removeRow() ) I am getting a error” TypeError: argument 1 of QAbstractItemModel.removeRow() has an invalid type”. I have searched a lot for the correct way of deleting a selected row/rows in qtableview of pyqt. However, I am not able to delete the selected

Advertisement