PDA

View Full Version : Doubts in 40000 chips



prosass
24th February 2007, 17:43
Hello everyone,
I´m new to Qt and I was exploring the 40000 chips demo, trying to adapt it to the application I want to build. That app is a map where i can see the objects located in the map.

1) What is the use of x and y in the chip(color, x, y)? Are they coordinates?

2) I tried to use an image as a background image, but tiles show up? Any way to expand the image so it takes up the whole space?

That´s it for the moment, I hope someone can help me.

Regards.

wysota
24th February 2007, 19:06
1) What is the use of x and y in the chip(color, x, y)? Are they coordinates?
Yes, they are.


2) I tried to use an image as a background image, but tiles show up? Any way to expand the image so it takes up the whole space?

Sure, scale the pixmap accordingly before applying it.

prosass
26th February 2007, 14:57
Thanks Wysota, but I have an additional question.

I was able to avoid the tiles by using a QPixmap and adding it to the scene. Now my problem is that I want to adapt the image that I use to fit the screen. For example, if the image´s size is several megapixels, I want it to fit in my screen so I don´t have to use the zoom out everytime I load an image. How do I do this?

Thanks in advance and regards.

wysota
26th February 2007, 15:01
QGraphicsView::fitInView()