Python Forum
Interfacing from Python to GUI
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Interfacing from Python to GUI
#8
I found a solution:

class PlotGUI(QMainWindow):

    def __init__(self):
        super(PlotGUI, self).__init__()
        uic.loadUi("PlotGUI.ui", self)
        self.show()

        global txt_log                     #  <<<<<<<<<<<<<< these two lines
        txt_log = self.textEdit_log  #  <<<<<<<<<<<<<< these two lines
Then a small aggregating (append + repaint) function

def txt2log(str):
    txt_log.append(str)
    txt_log.repaint()
And finnaly,

txt2log("appending text")
placed in any other function is doing the job.

Thank you
H. Martins
Reply


Messages In This Thread
Interfacing from Python to GUI - by HMartins - Apr-20-2023, 10:27 AM
RE: Interfacing from Python to GUI - by Axel_Erfurt - Apr-20-2023, 11:43 AM
RE: Interfacing from Python to GUI - by HMartins - Apr-20-2023, 02:55 PM
RE: Interfacing from Python to GUI - by Axel_Erfurt - Apr-20-2023, 03:56 PM
RE: Interfacing from Python to GUI - by HMartins - Apr-20-2023, 05:00 PM
RE: Interfacing from Python to GUI - by HMartins - Apr-20-2023, 05:12 PM
RE: Interfacing from Python to GUI - by Axel_Erfurt - Apr-21-2023, 11:21 AM
RE: Interfacing from Python to GUI - by HMartins - Apr-23-2023, 06:06 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Thoughts on interfacing with a QR code reader that outputs keystrokes? wrybread 1 1,524 Oct-08-2021, 03:44 PM
Last Post: bowlofred
  Interfacing with a USB game controller barryjo 2 8,946 Oct-31-2016, 08:21 PM
Last Post: barryjo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020