Comments (2)
In this case, cModelQuantitation_MeasureData must be inherited from QSerializer. Also, i don't tested non direct inherit with many base-classes. Maybe, Q_PROPERTY work not correctly in this case.
from qserializer.
이 경우 cModelQuantitation_MeasureData는 QSerializer에서 상속되어야 합니다. 또한 많은 기본 클래스로 비 직접 상속을 테스트하지 않았습니다. 이 경우 Q_PROPERTY가 제대로 작동하지 않을 수 있습니다.
class cModelQuantitation_MeasureData : public cSerializer
{
Q_GADGET
QS_SERIALIZABLE
QS_FIELD(bool, IsChecked) // 체크박스 상태
QS_COLLECTION(QVector, qreal, vConc) // 농도
QS_COLLECTION(QVector, qreal, vTRA) // 투과율
QS_COLLECTION(QVector, qreal, vABS) // 흡광도
QS_COLLECTION(QVector, QString, vCellNumber) // 셀번호
QS_FIELD(QString, strSampleName) // 샘플명
QS_FIELD(double, strTemperature) // 온도
};
cModelQuantitation_MeasureData is also used by inheriting cSerializer.
Any solution?
==========================================================
Fields in cModelStandardCurve get values normally.
However, the contents of QS_COLLECTION and QS_OBJECT cannot be imported.
==========================================================
One thing I found is that the contents of metaObject()->property(i).name() come in as class variable names, not class names.
If it comes in as a class name, it seems to be normal behavior.
==========================================================
if (name == "cSTC_MeasureData")
{
auto f = doc.firstChildElement("cModelStandardCurve_MeasureData");
if(!f.isNull())
metaObject()->property(i).writeOnGadget(this, QVariant::fromValue<QDomNode>(f));
}
else if (name == "cSTC_Reportopt")
{
auto f = doc.firstChildElement("cReportOption");
if (!f.isNull())
metaObject()->property(i).writeOnGadget(this, QVariant::fromValue<QDomNode>(f));
}
By modifying the else part of the fromXml function like this, it works normally. Is there any other way besides what I did?
The method I'm doing now is a passive method.
from qserializer.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qserializer.