[Qt-interest] a clickable bitmap question

Marek Bronowicki marek at cyberdeus.pl
Fri Oct 28 19:30:09 CEST 2011


Hello

I received a question about a feature in software.. i'll try to explain 
what I need to create.

The goal is to create some class that will show bitmap with some area of 
building, and after clicking in area of rectangle that I will prepare 
(for example 100,100 to 200,200) it will show some information about the 
area... something like electronic museum guide... it's still a simple 
thing, because when I get the position of cursor, and get the click I 
just check with defined rectangles. The problem for me is when I need to 
zoom the bitmap, because it's too big to show on one screen, and if I 
will show all, the room rectangles will  have about a square of four 
pixels (try to touch it with finger on touch screen :-) )

Second thing is to change color of area which is just clicked, but I 
think it's a simple thing to create QPixmap and just show it in the area.

Could someone give me some hint what to use? I used the QPixmap and 
QLabel just for showing simple bitmaps, so I just don't know what to 
use... QGraphicsView maybe?

Best Regards,
Marek Bronowicki




More information about the Qt-interest-old mailing list