• 7287阅读
  • 2回复

[提问]“intersect”: 不是“QRegion”的成员 [复制链接]

上一主题 下一主题
离线jysh321
 

只看楼主 倒序阅读 楼主  发表于: 2014-06-01
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);
            }
        }
    }
离线dbzhang800

只看该作者 1楼 发表于: 2014-06-01
有空没空,多看看帮助文档。首先,它他告诉你Qt5有这个东西,其次告诉你用什么可以替代它。

The following members of class QRegion are part of the Qt compatibility layer. We advise against using them in new code.

QRegion QRegion::intersect(const QRect & rect) const
Use intersected(rect) instead.
离线toby520

只看该作者 2楼 发表于: 2014-06-01
  dbzhang还是老江湖
QtQML多多指教开发社区 http://qtclub.heilqt.com
将QtCoding进行到底
关注移动互联网,关注金融
开发跨平台客户端,服务于金融行业
专业定制界面
群号:312125701   373955953(qml控件定做)
快速回复
限100 字节
 
上一个 下一个