107 int id = qRegisterMetaType<MyStruct>();
112 int id = qMetaTypeId<QString>();
113 id = qMetaTypeId<MyStruct>();
129 std::deque<QFile*> container;
138 #include <unordered_list>
144 std::unordered_map<int, bool> container;
157 qDebug() <<
sp->metaObject()->className();
169 auto smart_ptr = std::make_shared<QFile>();
174 qDebug() <<
sp->metaObject()->className();
The QDataStream class provides serialization of binary data to a QIODevice.
operator>>(QDataStream &ds, qfloat16 &f)
operator<<(QDataStream &ds, qfloat16 f)
The QFile class provides an interface for reading from and writing to files.
The QObject class is the base class of all Qt objects.
The QString class provides a Unicode character string.
The QVariant class acts like a union for the most common Qt data types.
static auto fromValue(const T &value) -> std::enable_if_t< std::is_copy_constructible_v< T >, QVariant >
bool canConvert(QMetaType targetType) const
void setValue(T &&avalue)
QTextStream out(stdout)
[7]