Top "Qvariant" questions

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

How to sort QList<QVariant> in Qt?

I have the following datastructure. QList<QVariant> fieldsList How can I sort this list? This list contains strings. …

qt sorting qvariant
How can I cast a QVariant to custom class?

I'm developing a BlackBerry 10 mobile application using the Momentics IDE (native SDK). I have a listview which I want to …

c++ qt blackberry-10 cascade qvariant
How to verify QVariant of type QVariant::UserType is expected type?

I'm writing testing code that will automatically iterate thru all Q_PROPERTY's of widgets and some properties are using types …

qt qvariant
Convert a QVariant of a custom type to a QString

I have a custom class called Money that I have declared with Q_DECLARE_METATYPE(). class Money { public: Money(double …

qt4 qvariant
Converting QList to QVariant

The class contains this: Q_PROPERTY(QList<double> switch1 READ switch1 WRITE setSwitch1 NOTIFY switch1Changed) void setSwitch2(…

c++ qt qtcore qlist qvariant
Casting a list as QVariant or QVariant List

My problem is this. I have lists of different numeric types, for example: QList<qreal> mylist; Now, in …

qt qvariant
How to get the original python data from QVariant

I am just learning python and Qt these days. So please consider that this will be a newbie question, but …

python pyqt pyqt4 data-conversion qvariant
QVariant to QIcon/QPixmap/QImage

I want to extract a QIcon I've stored in one of a QTreeWidget's columns, as Qt::DecorationRole. QTreeWidgetItem *item = ui-&…

c++ qt qvariant
QVariant with custom class pointer does not return same address

I need to assign a pointer to a custom class in qml using QQmlContext::setContextProperty(). Another qml object has Q_…

qt qt5 qvariant
How to convert an unsigned long int to QVariant

I have realized that QVariant does not offer functionality for long and unsigned long. It offers conversions to int, unsigned …

long-integer qvariant