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
Tag: pyqt5
Inserting rows in QTreeView that uses QSortFilterProxyModel
I have a very basic app that displays a tree view and a button that adds items to that tree view, using current selection as a parent. Inserting a first level child works well while inserting the 3d level child fails for some reason (it just is not displayed after inserting is done. I’ve prepared fully verifiable code that you
clicked.connect() will not access the method
I have a seperate script that calls this one… I don’t understand why my button click is not going into the corresponding function. I am quite new at this so if you do know the answer, could you explain it to me so that I can learn it. Answer Remove this line: self.windowWid = QWidget() and change layout = QGridLayout(self.windowWid)
PyQt5 QImage from Numpy Array
Considering the following code I get the following error TypeError: arguments did not match any overloaded call: QImage(): too many arguments QImage(QSize, QImage.Format): argument 1 has unexpected type ‘numpy.ndarray’ QImage(int, int, QImage.Format): argument 1 has unexpected type ‘numpy.ndarray’ QImage(bytes, int, int, QImage.Format): argument 1 has unexpected type ‘numpy.ndarray’ QImage(sip.voidptr, int, int, QImage.Format): argument 1 has unexpected type ‘numpy.ndarray’ QImage(bytes, int,
How to add a QVideoWidget in Qt Designer?
I want to insert video in blue box(ui image) but I don’t know how to insert video file. My code is here. I don’t know how to add video… Just know example that make video player … Thank you for reading my question. Answer Qt Designer does not show all the Qt widget, and often we want to add our
Display an image in a label without saving it
The following lines are in my script: from PyQt5 import QtGui, QtWidgets, QtCore from PyQt5.QtGui import QIcon, QPixmap from PyQt5.Widgets import * import cv2 def positioningCross(Dy, Dx, center, imgCross): if(center[1,0]>=center[0,0]): Dy2 = center[0,0] + np.absolute(Dy) else: Dy2 = center[1,0] + np.absolute(Dy) if(center[0,1]>=center[1,1]): Dx2 = center[1,1] + np.absolute(Dx)/2 else: Dx2 = center[0,1] + np.absolute(Dx)/2 P1 = (center[0,1]/2,center[0,0]/2) P2 = (center[1,1]/2,center[1,0]/2) P3
PyCharm showing wrong parameter info for PyQt methods
I don’t do a lot of work in GUI’s, but I’ve decided to move from occasionally using PyQt4 to PyQt5. My IDE is giving me warnings about some of the __init__ functions, particularly QWidget and QMainWindow. If you look at the IntelliSense’d parameters, you’ll see that the parentparameter has a default and the flags does not. The IDE tells me
How to hide checkboxes in a QTableView using python?
I’m quite new to python as well as to Qt. I would like to use the QTableView without checkboxes appearing in the tableview’s cells, but as it seems they just appear there by default. As I’ve found out so far, you just have to deactivate the Qt.ItemIsUserCheckable flag. But how am I supposed to do this? I tried to use
Qt Framework, PyQt5 and AttributeError: ‘MyApp’ object has no attribute ‘myAttribute’
Last week I started to learn Python and I developed some command line apps. Now I would like to develop apps with GUI. I searched in internet and I found a project that fits my needs: Qt Project (http://qt-project.org) and PyQt (http://www.riverbankcomputing.com/software/pyqt/intro). I installed Qt 5.3.2 Open Source, SIP 4.16.4, PyQt5 5.3.2 on Mac OS X 10.10 and python 2.7.6.
How can I change the cursor shape with PyQt?
I have a simple application that runs a process that can last for several minutes before completing. I am trying to provide an indication to the user that it is processing the request – such as changing the cursor to an hourglass. But I cannot quite get it to work right. All of my attempts have resulted in either an