相关文章推荐
不羁的肉夹馍  ·  Centos7 安装 Python3 ...·  1 年前    · 
帅呆的长颈鹿  ·  CreateProcessAsUser ...·  1 年前    · 
火星上的海豚  ·  python中 1<2<3_python ...·  1 年前    · 
QT6 QtPropertyBrowser属性页

QT6 QtPropertyBrowser属性页

Qt 八大开源项目之一

git:

Qt6 移植

error: C3646: “regExp”: 未知重写说明符

#include <QRegularExpression>
QRegExp 
==>QRegularExpression

error: unknown type name 'QMatrix'

QMatrix
==>QMatrix4x4

error: no member named 'init' in 'QStyleOption'

QStyleOption opt;
    opt.init(this);
==> opt.initFrom(this);

error: no member named 'setMargin' in 'QHBoxLayout'

 QHBoxLayout *layout = new QHBoxLayout(this);
    layout->addWidget(m_lineEdit);
    layout->setMargin(0);
==> layout->setContentsMargins(0,0,0,0);

error: use of undeclared identifier 'qFindChildren'

qFindChildren<QtDatePropertyManager *>(manager)
==>manager->findChildren<QtDatePropertyManager *>()

error: use of undeclared identifier 'qVariantSetValue'

QVariant v;
    qVariantSetValue(v, val);
==> v.setValue(val);

error: use of undeclared identifier 'qVariantValue'

qVariantValue()
==>qvariant_cast()

error: C2039: "Wildcard": 不是 "QRegularExpression" 的成员

 Data() : regExp(QString(QLatin1Char('*')),  Qt::CaseSensitive, QRegularExpression::Wildcard),
            echoMode(QLineEdit::Normal), readOnly(false)
 Data() : regExp(QRegularExpression::wildcardToRegularExpression(QString(QLatin1Char('*'))),
            echoMode(QLineEdit::Normal), readOnly(false)

error: no member named 'exactMatch' in 'QRegularExpression'

    if (data.regExp.isValid() && !data.regExp.exactMatch(val))
        return;
if (data.regExp.isValid() && !data.regExp.match(val).hasMatch())
        return;

error: C2065: “QStyleOptionViewItemV3”: 未声明的标识符

QStyleOptionViewItemV3
==>QStyleOptionViewItem

error: use of undeclared identifier 'QStyleOptionViewItemV2'

QStyleOptionViewItemV2
==>QStyleOptionViewItem

error: no member named 'setMovable' in 'QHeaderView'

    m_treeWidget->header()->setMovable(false);
    m_treeWidget->header()->setResizeMode(QHeaderView::Stretch);
    m_treeWidget->header()->setSectionsMovable(false);
    m_treeWidget->header()->setSectionResizeMode(QHeaderView::Stretch);

error: no member named 'setItemExpanded' in 'QtPropertyEditorView'

    m_treeWidget->setItemExpanded(newItem, true);
==>newItem->setExpanded(true);

error: no member named 'getRgba' in 'QColorDialog'

    QRgb oldRgba = m_color.rgba();
    QRgb newRgba = QColorDialog::getRgba(oldRgba, &ok, this);
    QRgb oldRgba = m_color.rgba();
    QRgb newRgba;///= QColorDialog::getRgba(oldRgba, &ok, this);
    QColor newColor = QColorDialog::getColor(m_color,this);
    newRgba = newColor.rgba();

error: C1083: 无法打开包括文件: “QDesktopWidget”: No such file or directory

#include <QDesktopWidget>
//#include <QDesktopWidget>

error: no member named 'desktop' in 'QApplication'

QApplication::desktop();
QWidget::screen();

error: C3861: “qSort”: 找不到标识符

qSort(allvisible.begin(), allvisible.end(), QtCanvasItemLess());
std::sqSort(allvisible.begin(), allvisible.end(), QtCanvasItemLess());

error: ISO C++17 does not allow 'register' storage class specifier

    register EdgeTableEntry *pETEchase;
删除register 

error: no member named 'toList' in 'QSet<QtCanvasItem *>'

return d->itemDict.toList();
return d->itemDict.values();

error: no member named 'sprintf' in 'QString'

r.sprintf("%04d", i);
r.asprintf("%04d", i);

error: C2039: "isInvertible": 不是 "QMatrix4x4" 的成员

    bool ok = wm.isInvertible();
    bool ok = wm.toTransform().isInvertible();

C2660: “QFont::resolve”: 函数不接受 0 个参数

    if (oldVal == val && oldVal.resolve() == val.resolve())
        return;
    if (oldVal == val && oldVal.resolve(oldVal) == val.resolve(val))
        return;

error: C2039: "setMatrix": 不是 "QPainter" 的成员

    p->setMatrix(wm);
    p->setWorldTransform(wm.toTransform());

error: C2664: “QPoint QMatrix4x4::map(const QPoint &) const”: 无法将参数 1 从“QPainterPath”转换为“const QPoint &”

    p->setClipPath(d->xform.map(clipPath), Qt::IntersectClip);