Saturday, July 5th 2008, 11:12pm UTC+1

You are not logged in.

  • Login
  • Register

1

Wednesday, April 9th 2008, 11:13am

Displating image in a frame

Hi
i am using Qt3 designer.
can any one help me with this.
i need to display an image " aaa.jpg" i can also convert it into "aaa.png"
can any one help me by telling that how can i display that image in a dialog
means i want to ask that which container/widget should i use.
n how can i change its properties, so that i can display that image.
Regards
Anubhav Tuli
  • Go to the top of the page

2

Monday, April 14th 2008, 7:22am

RE: Displating image in a frame

Hi,

You can use a Lable as a container to hold that image. Try with the following code

QImage image;
image.load("./surge.jpg");
ui.label->setAlignment(Qt::AlignCenter);
ui.label->setPixmap(QPixmap::fromImage(image));

Regards,
Anusha
  • Go to the top of the page

Rate this thread