In which case should we use which one for what reason?
Please guide.
In which case should we use which one for what reason?
Please guide.
Qt provides four classes for handling image data: QImage, QPixmap, QBitmap and QPicture.Please guide.
- QImage is designed and optimized for I/O, and for direct pixel access and manipulation.
- QPixmap is designed and optimized for showing images on screen.
- QBitmap is only a convenience class that inherits QPixmap, ensuring a depth of 1.
- QPicture class is a paint device that records and replays QPainter commands.
This is only a heads up, rest can be found in Qt Docs
What is you case (aka requirement)?In which case should we use which one for what reason?
When you know how to do it then you may do it wrong.
When you don't know how to do it then it is not that you may do it wrong but you may not do it right.
TheIndependentAquarius (19th October 2013)
Thanks for your reply.
Actually I have made something similar to this:
http://programmingexamples.wikidot.c...ainter-example
I wish to display those lines in a Rectangle in QML. The line's properties will be decided at run time.
What should I prefer?
Have a look at QDeclarativeItem API and it should become perfectly clear what approach you should take. Hint: QDeclarativeItem is derived from QGraphicsItem which has a paint() method.
TheIndependentAquarius (20th October 2013)
Thankful to you. I have another question now.
Bookmarks