from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Pic(object): def setupUi(self, Pic): Pic.setObjectName("Pic") Pic.resize(554, 416) self.centralwidget = QtWidgets.QWidget(Pic) self.centralwidget.setObjectName("centralwidget") self.butTake = QtWidgets.QPushButton(self.centralwidget) self.butTake.setGeometry(QtCore.QRect(413, 27, 100, 210)) self.butTake.setObjectName("butTake") self.button1 = QtWidgets.QPushButton(self.centralwidget) self.button1.setGeometry(QtCore.QRect(413, 270, 100, 85)) self.button1.setObjectName("button1") self.label = QtWidgets.QLabel(self.centralwidget) self.label.setGeometry(QtCore.QRect(16, 27, 389, 327)) self.label.setText("") self.label.setObjectName("label") Pic.setCentralWidget(self.centralwidget) self.retranslateUi(Pic) QtCore.QMetaObject.connectSlotsByName(Pic) def retranslateUi(self, Pic): _translate = QtCore.QCoreApplication.translate Pic.setWindowTitle(_translate("Pic", "pic")) self.butTake.setText(_translate("Pic", "Chụp")) self.button1.setText(_translate("Pic", "Lưu")) if __name__ == "__main__": import sys app = QtWidgets.QApplication(sys.argv) Pic = QtWidgets.QMainWindow() ui = Ui_Pic() ui.setupUi(Pic) Pic.show() sys.exit(app.exec_())