[Qt-interest] Detect clicks over certain areas of a bitmap

Sergio Salas sergio.salas.bernal at gmail.com
Thu Dec 18 22:33:12 CET 2008


Hello,

I have just begun with Qt libraries and I need some help. I want to
detect when the user click over certain areas of a bitmap, but I don't
know the best way to do it.

My first idea was to use a QButtonGroup with transparent QPushButtons
placed over the bitmap, and connect the signal "clicked(int id)" to one
of my functions. This way I could know when the user has clicked over
the bitmap and in wich area. Unfortunately, I couldn't make a button
transparent. 

Is there any way to get a transparent button or define one area of a
bitmap and detect when the user click on it?

Thank you all.

Sergio




More information about the Qt-interest-old mailing list