Which is the correct code statement to create a canvas in PyQt?

22. Which is the correct code statement to create a canvas in PyQt?

  1. self.image = QImage(self.size(), QImage.Format_RGB32)
  2. self.image = QImage()
  3. self.image = QImage(QImage.Format_RGB32, self.size())
  4. None of the above

Answer: A) self.image = QImage(self.size(), QImage.Format_RGB32)

Explanation:

The correct code statement to create a canvas in PyQt is:

self.image = QImage(self.size(), QImage.Format_RGB32)

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.