@Volko54

Как в Pyqt5 Написать в lineEdit Привет, потом нажать на pushButton и в lineEdit_2 вывелся привет друг?

from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from PyQt5 import uic, QtWidgets
Form, _ = uic.loadUiType("opp.ui")
import os
from PyQt5.QtWidgets import (QMainWindow, QApplication, QWidget,
QPushButton, QAction, QLineEdit, QMessageBox)
class Ui(QtWidgets.QDialog, Form):
def __init__(self):
super(Ui, self).__init__()
self.setupUi(self)
self.pushButton_2.clicked.connect(self.printButtonPressed)
self.pushButton_23.clicked.connect(self.grod)
self.pushButton_25.clicked.connect(self.bgw)
self.pushButton_26.clicked.connect(self.deu)
self.pushButton_21.clicked.connect(self.en)
value = self.lineEdit(self)


def printButtonPressed(self):
os.startfile(r'C:\Users\user\Desktop\testr.docx')

def en(self):
textboxValue = self.value.text()
self.value.setText("")
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
w = Ui()
w.show()
sys.exit(app.exec_())
  • Вопрос задан
  • 52 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы