Skip to content Skip to sidebar Skip to footer

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'

Solution 1:

You should only have a single QApplication even if you have many windows, considering the above the solution is:

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")

uiedit = uic.loadUi(r"D:\UI_test\gui\input_TT.ui")


def edit1():
    uiedit.show()
    uiedit.lineEdit_CC.setText("text")


ui.pushButton_1edit.pressed.connect(edit1)
ui.show()
app.exec_()

Post a Comment for "Python & Qtdesigner Uic Pop-up Window Lineedit Access"