View Single Post
Old 11-25-2020, 01:12 PM   #1
wrench100
Member
wrench100 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Mar 2018
Device: Kindle
Button triggering automatically

I've just added a new button to my plug-in interface. For some reason, when I open the plug-in, that button's function fires off automatically. Here's my code for defining the button:

Code:
self.unshelve_TSBL1_button = QPushButton(
            'Unshelve from TSBL 1', self)
        self.unshelve_TSBL1_button.clicked.connect(self.doUnshelve('status:TSBL1shelved'))
        self.l.addWidget(self.unshelve_TSBL1_button)
If I comment out the connect line, the interface appears as normal, with the new button showing properly. As soon as I uncomment the line, the doUnshelve routine gets called as soon as I open the plugin.

Any ideas?
wrench100 is offline   Reply With Quote