Hi,
am making changes to a photogallery which was designed on Qt 3.3

All that I changed in the form till now(which I did using designer) was add a Label 'rotatepic' near the 'Rotate' button.

In the slot rotate() for the 'Rotate' button,I added one extra line-
Qt Code:
  1. rotatepic->setPaletteBackgroundColor(QColor(170,255,0));
To copy to clipboard, switch view to plain text mode 

so that when I click the 'Rotate 'button,the 'rotate' label next to it also changes to the same colour as the 'Rotate' button changes to.But,when I run the program,I get a segmentation fault when I click the 'Rotate' button.

if I comment out the line rotatepic->setPaletteBack....., The 'Rotate' feature works fine.

I have buttons like Next,Previous,Slideshow etc....in whichever button's slot I add the line of code mentioned above,I get a segmentation fault corresponding to that button.If i comment out that line,things work fine.

I can't figure out what's wrong.
Please advice.

Thanks in advance.