Top "Qvariant" questions

QVariant is a data type in Qt library, that acts as a "container" for most of the common Qt data types.

Assigning to nested QVariantMap

#include <QtCore/QCoreApplication> #include <QVariant> #include <QtDebug> int main(int argc, char *argv[]) { QCoreApplication …

c++ qt qvariant qmap
Best way to access a cpp structure in QML

I need to pass structures between cpp and QML. If i use property i should create an individual set and …

qt qml qtquick2 qt-quick qvariant
How do I convert QMap<QString, QMap<QString, int> > to a QVariant?

QVariant (needed for QSettings class) supports creation from QMap<QString, QVariant> But trying to initialise something like this: …

c++ qt4 nested qvariant qmap
Is there a reason why QVariant accepts only QList and not QVector nor QLinkedList

QVariant appears to accept QList<QVariant> and not QVector<QVariant> nor QLinkedList<QVariant>. Is …

c++ qt stl vector qvariant
From QVariant to Integer and String

The user's entered value can be both: a string or an integer. QAbstractTableModel's setData() method always gets this value as …

c++ qt pyqt qtcore qvariant
Converting QVariant to a QStringList

I have stored QStringList in a QVariant variable while calling setData function. Now I'd like to restore this data from …

qt qvariant qstringlist
Serializing QVariant through QDataStream

I'm possibly writing it wrong but here's the code that i'm trying to execute and it fails to do what's …

c++ qt serialization qvariant
Convert QPair to QVariant

I have the following problem: I want to transmitt data via TCP, and wrote a function for that. For maximum …

c++ qt tcp qvariant