PDA

View Full Version : button to slots



uchennaanyanwu
26th July 2008, 22:44
I am a nubie at Qt and would like some help. I am trying to create a button widget that when clicked would go to a execute the slot of another widget called paintEvent. Do you have any ideas how to do this ?
I have attempted to do this, but I get the following error:
QObject::connect: Cannot connect QPushButton::clicked() to (null)::paintEvent(QPaintEvent * e)

salmanmanekia
26th July 2008, 23:26
I am not sure if i understand what you are trying to explain...
you are mistaken because paintEvent() is not a slot ,so to repaint just call the update() which is a slot or if you want also some extra work apart from repaint make your own slot..