alibaba / alibaba/yalantinglibs
[reflection] Cant calculate the member count of struct if it contains Qstring
Open
bug
- Dominant language
- C++
- Stars
- 2.2k
- Forks
- 327
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 2
Description
```cpp
struct Settings {
Type type = Type::Tcp;//连接类型
QString portName;
int parity = QSerialPort::NoParity;//校验方式
int baud = QSerialPort::Baud9600;//波特率
int dataBits = QSerialPort::Data8;//数据位
int stopBits = QSerialPort::OneStop;//停止位
int responseTime = 1000;//超时时间
int numberOfRetries = 3;//重试次数
bool autoConnect = false;//自动连接
QString notes = "Modbus主站";//备注信息
QString address = "127.0.0.1";//tcp链接地址
qint16 port = 8080;//tcp端口
QVariant id = QVariant();
};
```
这是我在QT中自定义的结构体,我想使用反射或者struct_json::to_json来实现互相转换,但是编译会报错不支持的类型,我要怎么做才能支持自定义的类
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.