pyqt5

How do I set my font?

My code import sys from PySide2.QtCore import (QCoreApplication, QMetaObject, QObject, QPoint, QRect, QSize, QUrl, Qt) f ... the font on this path or not. So I don't even know what the problem might be. Does anyone know the solution to this problem?

Progress Bar in Qt5 (python)

I make the application in a completely different style from windows, that is, I make the style of all widgets my own, using ... -just as a an example of what I want (the goal is just to make it out of a png file (s), no matter what kind of image it is)

How to remove the distance between blocks in QGridLayout when Fixed / maximum size of widgets?

If you try to limit the size of the widget, then only the horizontal space disappears when spacing=0, is it possible to remov ... dgets.QVBoxLayout(widget) mainbox.addLayout(gridbox) self.setCentralWidget(widget) self.setMinimumSize(500, 500)

Changing the Color Dialog PyQt5

In the vastness of stackoverflow, I found an example with color_dialog in PyQt5. I wanted to add it to my app, but I want to ... app = QtWidgets.QApplication(sys.argv) w = MainWindow() w.resize(640, 480) w.show() sys.exit(app.exec_())

Convert QtGui.QImage to black and white image

How do I convert an image QtGui.QImage to a black and white image?

PyQt5 icon for the app

I'm trying to set an icon for the application (exactly so that it is displayed on the taskbar, and not on the application win ... .setWindowIcon(QtGui.QIcon('bug.ico')) window.show() sys.exit(app.exec_()) Picture: Https://i.stack.imgur.com/BLBwO.png

How do I close a window and open a new one in Pyqt5?

I have a game menu on pytq. When you click on the start game button, the window where the game should be opens and the main m ... the function itself closes the window of the Main () class, which creates the menu and whose method is the go_start function

Reading text from the TextEdit widget field from pyqt5 Python

In a Python 3.7.4 program using PyQt5, there is a problem with reading text from the text field of the TextEdit widget. Pleas ... (_translate("MainWindow", "PushButton")) def copy_text(self): text = self.textEdit.text() print(text)

Pyqt5 How to open.an exe file?

I want to open an exe file through a pyqt5 program. I press wait does not start what to do ? Code: from PyQt5 import QtWidg ... f = open('Roblox.exe') app = QtWidgets.QApplication([]) application = mywindow() application.show() sys.exit(app.exec())

3D model animation in Python

I have an application on PyQt and I want to add a window with animation 3D models. I have the rig of this model, the model an ... ;/string> </property> </widget> </widget> <resources/> <connections/> </ui>

How to assign numeric keys to Numpad in keyPressEvent

I don't know the name of the key (if there is one).) def keyPressEvent(self, e): if e.key() == Qt.Key_NumPad1 #как отобразить нажатие клавиш NumPad'а?

How do I remove the distance between widgets in QHBoxLayout?

The horizontal container box1 contains the containers box2 and box3. box2 contains buttons with images, and box3 has a color, ... main__': import sys app = QtWidgets.QApplication(sys.argv) w = MyWindow() w.show() sys.exit(app.exec_())

How do I change the text color in QLabel?

There is QLabel, how do I change the text color in RGB? self.Label = QtWidgets.QLabel("", self) self.Label.move(50, 30) self.Label.resize(421, 41)

Why does qApp. quit () require two calls from QDialog?

There is a code containing the main window and the dialog box. The dialog box starts immediately after the main one, because ... ui.setupUi(MainWindow) MainWindow.show() dlg = Ui_Dialog(MainWindow.x(), MainWindow.y()) dlg.exec() sys.exit(app.exec_())

How do I round the edges of an image?

I am learning how to make applications in PyQt5, and I have a task to round the edges of the image. Is there any way to do ... e(140, 140)) box = QtWidgets.QHBoxLayout() box.addWidget(button) window.setLayout(box) window.show() sys.exit(app.exec_())

How to add text to Label in pyside2(pyqt5)

How do I add text, not set(ui.setText()) but add. So that the old text is not erased

PyQt5 QTreeWidget-working out the click on the tree elements

I build a tree and output it to QTreeWidget (https://clip2net.com/s/450X4zs) thus: def treeRubrics(self): self.treeL ... ach list item where was your ID put down and it was returned when you clicked on it? Thank you to everyone who will tell you!

Right alignment of text in QTextEdit

I have been puzzling over the correct alignment of the text in QTextEdit for quite a long time. At the moment, my output fiel ... ly set to left edge. As a solution - every time after using .setText() again prescribe self.field.setAlignment(Qt.AlignRight)

How do I get a value from a QListView list?

lv = QtWidgets.QListView() slm = QtCore.QStringListModel(['1','2','3']) lv.setModel(slm) lv.doubleClicked.connect(item_clicke ... ng value from the list? P.S. the available similar answer did not help, I'm just starting to master pyqt a lot is not clear.

Problem with setting up pyqt in pycharm

I'm trying to configure pyqt5 in pycharm 2020.2.1. First, I set pyqt5 like this: pip install pyqt5 Then I set tools like thi ... ferent versions, the programs stopped working, before that directly who used pyqt-RadeonSettings, mediaget. What is delatb...