QT5.1中QRegion没有了 intersect。请问下面的代码如何调试:
for (int i = 0; i < image.width(); ++i) {
for (int j = 0; j < image.height(); ++j) {
QRect rect = pixelRect(i, j);
if (!event->region().intersect(rect).isEmpty()) {
QColor color = QColor::fromRgba(image.pixel(i, j));
if (color.alpha() < 255)
painter.fillRect(rect, Qt::white);
painter.fillRect(rect, color);
}
}
}