Hi every one. I'm very very beginner in QT. Plz help me if u have any idea for my problem, with many thanks.
Now my problem:
In part of my project I load an image and now I want to zoom in/out it; but I can't. The image and "scaleSlider" are shown on the screen properly, but changing scale by scaleSlider does not affect the image. this is my code:
Qt Code:
  1. void PanelWidgets::slotChangeImage(int val)
  2. {
  3. image.scaled(image.width()*val/100, image.height()*val/100);
  4. qDebug()<<val;
  5. }
To copy to clipboard, switch view to plain text mode 
and after many lines, we have:
Qt Code:
  1. bool b = image.load(":res/dab/logo.jpg");
  2. if(!b) qDebug()<<"Can not load image from path";
  3. if(b) scene->addPixmap(QPixmap::fromImage(image));
  4. QSlider *scaleslider = new QSlider(Qt::Horizontal,this);
  5. scaleslider->setRange(10,1000);
  6. scaleslider->setGeometry(700,100,200,30);
  7. connect(scaleslider,SIGNAL(valueChanged(int)),this,SLOT(slotChangeImage(int)),Qt::UniqueConnection);
To copy to clipboard, switch view to plain text mode 
I'm using QT Creator 2.4.1 (based on QT 4.7.4 32bit) and Win 7 x86.