Qt display image in a new window
Posted
by user312543
on Stack Overflow
See other posts from Stack Overflow
or by user312543
Published on 2010-04-09T06:30:25Z
Indexed on
2010/04/09
6:33 UTC
Read the original article
Hit count: 212
qt
Hi, I am naive to Qt and GUI programming.
http://stackoverflow.com/questions/1357960/qt-jpg-image-display/2605463#2605463
The procedure given for displaying an image is working fine and thank you for providing that. But I want to display an image when I click on radiobutton.
I created a slot, and I connected the button click event to the slot (dispImage is my slot). My slot consists only the code which is working to display an image (First answer in this link).
I am able to compile it and run it. But the o/p is not as we desire.
On button click, image windoe flashes for a sec and disappears.
One more point to share is, I tried the same with windowsflags example present in qt examples.
In this example I want to display the image on the preview window created by us. Even this is also not worked for me.
Please provide me the solution.
Thanks in advance.
© Stack Overflow or respective owner