Python Forum
Interfacing from Python to GUI
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Interfacing from Python to GUI
#1
Hi.

I have written some Python code and is works OK. I now need to, say, interface it better with the user, myself Wink

I got QT Designer and configured some dialogues including a textEdit widget called textEdit_log.

The code which I don’t understand much, looks like this:

from PyQt5.QtWidgets import *
from PyQt5 import uic

def main():
    app = QApplication([])
    window = PlotGUI()
    app.exec_()


if __name__ == '__main__':
    main()


class PlotGUI(QMainWindow):

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

        self.textEdit_log.append("Hi!")
As a result of last line above “Hi!” shows up in textEdit_log. Perfect

The problem is that I am struggling to find out how can I append text to textEdit_log from outside PlotGUI code, I mean, from ‘regular’ Python code.

Having understood how to solve this problem I will probably solve the other similar difficulties.

I hope this post is according to the rules Smile

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
  Media Pipe Python Interfacing with MATLAB cmcreecc 1 187 May-30-2024, 07:23 AM
Last Post: TrentErnser
  Thoughts on interfacing with a QR code reader that outputs keystrokes? wrybread 1 1,567 Oct-08-2021, 03:44 PM
Last Post: bowlofred
  Interfacing with a USB game controller barryjo 2 9,049 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