Я привык использовать QStringList () , он не сработал.QXmlStreamAttributes attributes;
attributes
Но это не удалось: < /p>
writer.writeAttributes(QXmlStreamAttributes()
он не удается с ошибкой: < /p>
C:\Workspace\untitled5\mainwindow.cpp:18: error: C2664: 'QXmlStreamWriter::writeAttributes' : cannot convert parameter 1 from 'QVector' to 'const QXmlStreamAttributes &'
with
[
T=QXmlStreamAttribute
]
Reason: cannot convert from 'QVector' to 'const QXmlStreamAttributes'
with
[
T=QXmlStreamAttribute
]
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
< /code>
Другая вещь, которую я заметил: < /h2>
Этот код компилирует: < /p>
QVector v1 = (QVector()
Но это не так, хотя qxmlstreamattributes наследует от qvector < /code>: < /p>
QXmlStreamAttributes v2 = (QXmlStreamAttributes()
это не удается с той же ошибкой. < /p>
Есть идеи, почему это происходит? < /p>
Подробнее здесь: https://stackoverflow.com/questions/271 ... ameter-1-f
Ошибка: C2664: 'qxmlstreamwriter :: writeattributes': не может преобразовать параметр 1 из 'qvector <t>' в 'const qxmlst ⇐ C++
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение