天道酬勤,学无止境

uic

Python & qtDesigner uic pop-up window lineEdit access

I'm newbie. I want to click a pushButton to open a new window and take text from main window lineEdit and copy to new pop-up window lineEdit. So far I an create new window but can't access lineEdit. No errors, app is not responding. This is what I have: from PyQt5.QtWidgets import QApplication from PyQt5 import uic app = QApplication([]) #Main Window ui = uic.loadUi(r"D:\UI_test\gui\main_gui_TT.ui") appedit = QApplication([]) #Pop-up uiedit = uic.loadUi(r"D:\UI_test\gui\input_TT.ui") def edit1(): uiedit.show() appedit.exec_() uiedit.lineEdit_CC.setText('text') <-this line is a problem ui

2021-05-12 11:55:23    分类:问答    python   pyqt   pyqt5   qt-designer   uic