[Tutor] help regarding game code

Matthew Ngaha chigga101 at gmail.com
Sun May 12 23:44:01 CEST 2013


>> bWater.clicked.connect( water_clicked ) AttributeError: 'int

use a paste site like http://bpaste.net/+python to show us the code.

i am no expert @ programming myself but that error is telling you you
used an int and tried to access an int method called connect somewhere
in your code. ints do not have this method. However some PyQt objects
(mostly button widgets) do have this method, which is actually a
signal called clicked for when you mouse click on the widget(button).
So basically ints (integers) do not have signals, try and connect the
name(variable name) of what you are clicking to that method, instead
of the int object (bWater)

bWater.clicked.connect( water_clicked )  should become:

button_name.clicked.connect( water_clicked )


More information about the Tutor mailing list