View Full Version : Redraw custom QGraphicsItem on QPushButton click
qutron
1st March 2011, 09:11
I've got lots of widgets grouped in different layouts on my main widget. One of them is QGraphicsView displaying custom QGraphicsItem. Everything works fine, but I need some additional functionality and I want to repaint custom QGraphicsItem on QPushButton click.
How can I do it?
Lykurg
1st March 2011, 10:06
Use signals and slots.
qutron
1st March 2011, 10:14
And what should I connect?
I am sure signal is QPushButton::clicked(). But what about slot?
EDIT: QGraphicsView::updateScene()?
Lykurg
1st March 2011, 10:24
No, you need to define your custom slot which changes the item you want. Qt can't know what you want.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.