Python Forum
[PyGUI] Pressing button by code after gui is loaded
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyGUI] Pressing button by code after gui is loaded
#1
Dear users,

I use an application where a gui is started:

class alkisImportDlg(QDialog, alkisImportDlgBase):

    def __init__(self):
        QDialog.__init__(self)
        self.setupUi(self)
        self.setWindowIcon(QIcon('logo.svg'))
        self.setWindowFlags(Qt.WindowMinimizeButtonHint)
        self.leSERVICE.setText(s.value("service", ""))
        self.leHOST.setText(s.value("host", "xxxx.xxxxxren.intern"))
        self.lePORT.setText(s.value("port", "5432"))
        self.leDBNAME.setText(s.value("dbname", "alkisnas7"))
        .....
        ......
        [color=#E74C3C]self.pbStart.clicked.connect(self.run)[/color]
In my .ui-file the button is created like:
<item>
<widget class="QPushButton" name="pbStart">
<property name="text">
<string>Starten</string>
</property>
</widget>
</item>


But what I need is, that after loading the GUI a function is called (without manually clicking)
that starts "self.run".

Could anybody give me a hint please?
Thank you very much, Kai
Reply
#2
Question is PyGui another version of Qt -- like PyQt and PySide2 ?? or is it one of these latter two?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] pressing the button arkiboys 2 1,723 Nov-17-2021, 02:08 PM
Last Post: arkiboys
  [PySimpleGui] How to alter mouse click button of a standard submit button? skyerosebud 3 4,949 Jul-21-2019, 06:02 PM
Last Post: FullOfHelp

Forum Jump:

User Panel Messages

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