What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-03-08 08:55:02
set width qpushbutton
//Use this: QPushButton* const button = new QPushButton(QString("<"), this); const QSize BUTTON_SIZE = QSize(22, 22); button->setMinimumSize(BUTTON_SIZE); //or: button->setSize(BUTTON_SIZE); //or: button->setMinimumSize(BUTTON_... Add solution -
Other 2022-01-24 22:36:35
qgis canvas as pyqt widget
from PyQt5 import QtCore, QtGui, QtWidgets from qgis.gui import QgsMapCanvas from qgis.core import QgsVectorLayer class Ui_MainWindow(object): def setupUi(self, MainWindow): self.main_window = MainWindow self.main_window.setObjectName... Add solution -
Python 2021-11-13 21:18:15
pyqt open file dialog
import sys from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget, \ QPushButton, QVBoxLayout, QFileDialog # you can copy and run this code class MainWindow(QMainWindow): def __init__(self, parent=None):#-------------- super(Main... Add solution -
Python 2021-11-09 11:27:09
pyqt create a qmenu on a button click
import sys from PyQt4 import QtGui, QtCore class MainForm(QtGui.QMainWindow): def __init__(self, parent=None): super(MainForm, self).__init__(parent) # create button self.button = QtGui.QPushButton("test button",self... Add solution -
Other 2021-11-09 05:20:15
hwo to run multiple QApplication in pyqt
from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtCore import * import time class MainWindow(QMainWindow): def __init__(self, *args, **kwargs): super(MainWindow, self).__init__(*args, **kwargs) self.counter = 0 ... Add solution -
Other 2021-10-25 12:09:09
qpushbutton
# needs to be imported first from from PyQt5.QtWidgets from PyQt5.QtWidgets import QPushButton btn = QPushButton("button1") # create it # now you can add it to your layout layout = QHBoxLayout() # from PyQt5.QtWidgets import QHBoxLayout layout.... Add solution
Best helpers
Ranking is empty