PDA

View Full Version : How to add new QImage to the left side of old QImage??



ganapathi
13th February 2016, 09:05
Hi,

I have a new QImages coming via network socket . I want t new one to the left of old QImage which I stored. How to add two QImages so new part comes to the left side only?

Thanks

anda_skoa
13th February 2016, 11:47
Add to where?

Cheers,
_

ganapathi
15th February 2016, 04:43
Add to where?

Cheers,
_

Add to old QImage. The result is printed via QLabel.

anda_skoa
15th February 2016, 09:28
So you want to create a new image that is the combination of the old image and the new image?

Cheers,
_

ganapathi
15th February 2016, 10:33
So you want to create a new image that is the combination of the old image and the new image?

Cheers,
_

Yes anda_skoa.
Thanks for your time.

anda_skoa
15th February 2016, 10:49
1) Create a new QImage that has the size necessary to hold both orignal images side-by-side.
2) Use a QPainter on that image to draw the other two images into it.

Cheers,
_

ganapathi
16th February 2016, 05:13
1) Create a new QImage that has the size necessary to hold both orignal images side-by-side.
2) Use a QPainter on that image to draw the other two images into it.

Cheers,
_

Dear Anda_skoa,
Thanks for your time.

Image I painted both the images. Next time new QImage comes. How do I paint this new one to the left of previous two images and so on .......with every new Image coming.

anda_skoa
16th February 2016, 08:54
You just do the same thing again.

Cheers,
_