PDA

View Full Version : painting problem.



joseph
24th July 2007, 15:03
Hi

I have a QRubberBand. Actually its says that QRubberBand will re-paint the "Parent object" while moving the Rubberband on its parent .( IF i am wron please correct me ..)

BUT.....
How can i restrict a QRubberband from re-painting its parent.
At the same time i want have to pass the "Parent object " in QRubberBand.
Is there any setFunction() to make it possible.

Thank you

joseph
25th July 2007, 06:29
hello...


Is there any body to help me...
Atleast give me a hint.

If i subclassed myRubberBand( QRubberBand ), can i achieve solution..???

thanks in advance.

joseph
25th July 2007, 08:21
can i expect any help from this forum..??

jpn
25th July 2007, 11:51
You must help us to help you. Could you state clearly what are you trying to do?

joseph
25th July 2007, 12:08
I am working with a Drawing application on a canvas ( Q3Frame ).
On canvas i will draw images. The folowing senario comes while CUT and PASTE the images in canvas.

While CUT : ( using CTRL + X )
1) i used to hide the images in canvas using BACKGROUND colour of canvs.
2) Then enduser wil get a feeling that the images have been cut from the canvas.


While PASTE : ( Using CTRl + V )
1) Now a QRubberband band wil comes along with a special cursor. 2) User can move this QRubberBand over the canvas , for locate the PASTING.
3) while clicking Left-mouse-button ...
a) the images will be pasted in canvas
b) and QRubberBand will be disappered

Exact Problem:
1) After CTRL + X , the images will be hidden in QFrame ( Drawing Canvas ).
2) Then user press CTRL +V for pasting , then rubberBand will comes .
3) While moving the rubberband over the hidden images in canves , they gets painted.
i want to avoid this re-painting of hidden images in canvas.


please help me.
thanks

marcel
25th July 2007, 12:18
But this is your implementation's fault.
Post some code, maybe we can help you.

How do you exactly hide those images? I suggest removing them entirely from the canvas.

Anyway, may I suggest to switch to QGraphicsView? You are using deprecated functionality.

Regards