What's Up?

OK, So I'm designing a nice new shiny UI for my Python script, Now when one of my buttons gets clicked I want it to perform some of my own defined tasks, So I need to define my own 'Slot' if I'm correct? But I can't figure out how, (Too stupid :-( )

QtCore.QObject.connect(self.Button, QtCore.SIGNAL("clicked()"), Custom() )

How can I specify my commands under the name Custom()?

Thanks Bye!

Recommended Answers

All 2 Replies

self.connect(self.youre_ui.youre_push_Button, QtCore.SIGNAL('clicked()'), QtGui.qApp, QtCore.SLOT('quit()'))

or

self.connect(self.ui.youre_push_Button, QtCore.SIGNAL('clicked()'), self.youre_function)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.