Home »
MCQs »
Pygame MCQs
Which is the correct code statement to create canvas in PyQt?
20. Which is the correct code statement to create canvas in PyQt?
- self.image = QImage(self.size(), QImage.Format_RGB32)
- self.image = QImage()
- self.image = QImage(QImage.Format_RGB32, self.size())
- None of the above
Answer
The correct answer is: A) self.image = QImage(self.size(), QImage.Format_RGB32)
Explanation
The correct code statement to create canvas in PyQt is:
self.image = QImage(self.size(), QImage.Format_RGB32)