Sunday, July 6th 2008, 4:20pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

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