![]() |
2010-01-18
, 10:37
|
Posts: 5 |
Thanked: 0 times |
Joined on Jan 2010
@ Madrid - Spain
|
#2
|
![]() |
2010-01-18
, 11:41
|
Posts: 434 |
Thanked: 325 times |
Joined on Sep 2009
|
#3
|
Hi to all!!
We are trying to load an internet image into a QLabel and we are finding some problems with the resizing of the QLabel after the connection. We will try to explain it describing our steps:
- Loading a local image into a Qlabel - OK. The QLabel resizes automatically when we load the new image into it.
- Loading an external image into a QLabel: The connection to the external url works, and we can load the image into the QLabel after the requestFinished event occurs, but we cannot resize the QLabel to the new image size. - KO.
We have tried to use the "update" method of the QLabel but this didn't work. Also, we have tried to modify the size().setWidth() and the size().setHeight but also failed.
Can anybody help us out??
Thanks in advance,
Best Regards
![]() |
2010-01-18
, 11:45
|
|
Posts: 754 |
Thanked: 630 times |
Joined on Sep 2009
@ London
|
#4
|
....
We have tried to use the "update" method of the QLabel but this didn't work. Also, we have tried to modify the size().setWidth() and the size().setHeight but also failed.
Can anybody help us out??
Best Regards
![]() |
2010-01-18
, 13:19
|
Posts: 5 |
Thanked: 0 times |
Joined on Jan 2010
@ Madrid - Spain
|
#5
|
get the pixmap of the imageLabel ( QLabel loaded with a QImage pixmap), and do
imageLabel->resize(scale * imageLabel->pixmap()->size());
see if it works
We are trying to load an internet image into a QLabel and we are finding some problems with the resizing of the QLabel after the connection. We will try to explain it describing our steps:
- Loading a local image into a Qlabel - OK. The QLabel resizes automatically when we load the new image into it.
- Loading an external image into a QLabel: The connection to the external url works, and we can load the image into the QLabel after the requestFinished event occurs, but we cannot resize the QLabel to the new image size. - KO.
We have tried to use the "update" method of the QLabel but this didn't work. Also, we have tried to modify the size().setWidth() and the size().setHeight but also failed.
Can anybody help us out??
Thanks in advance,
Best Regards