Fix bug#708 - "Remaining pyqtSignal in ref docs"
This commit is contained in:
parent
11a7187cf8
commit
e0799d7dcf
1 changed files with 3 additions and 4 deletions
|
|
@ -60,7 +60,7 @@ Defining New Signals with QtCore.Signal()
|
||||||
# The following will create exactly the same overloaded signal as
|
# The following will create exactly the same overloaded signal as
|
||||||
# above and demonstrates the use of C++ type names instead of Python
|
# above and demonstrates the use of C++ type names instead of Python
|
||||||
# type objects, and lists instead of tuples.
|
# type objects, and lists instead of tuples.
|
||||||
valueChanged = QtCore.pyqtSignal(['int'], ['unicode'])
|
valueChanged = QtCore.Signal(['int'], ['unicode'])
|
||||||
|
|
||||||
New signals should only be defined in sub-classes of QObject.
|
New signals should only be defined in sub-classes of QObject.
|
||||||
|
|
||||||
|
|
@ -79,7 +79,7 @@ Connecting, Disconnecting and Emitting Signals
|
||||||
|
|
||||||
class Foo(QtCore.QObject):
|
class Foo(QtCore.QObject):
|
||||||
# Define a new signal called 'trigger' that has no arguments.
|
# Define a new signal called 'trigger' that has no arguments.
|
||||||
trigger = QtCore.pyqtSignal()
|
trigger = QtCore.Signal()
|
||||||
|
|
||||||
def connect_and_emit_trigger(self):
|
def connect_and_emit_trigger(self):
|
||||||
# Connect the trigger signal to a slot.
|
# Connect the trigger signal to a slot.
|
||||||
|
|
@ -101,8 +101,7 @@ Connecting, Disconnecting and Emitting Signals
|
||||||
class Bar(QtGui.QComboBox):
|
class Bar(QtGui.QComboBox):
|
||||||
|
|
||||||
def connect_activated(self):
|
def connect_activated(self):
|
||||||
# The PyQt documentation will define what the default overload is.
|
# Avoid using default overloads, they are not safe and can change in the future.
|
||||||
# In this case it is the overload with the single integer argument.
|
|
||||||
self.activated.connect(self.handle_int)
|
self.activated.connect(self.handle_int)
|
||||||
|
|
||||||
# For non-default overloads we have to specify which we want to
|
# For non-default overloads we have to specify which we want to
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue