#include QVariant foo() { QVariantList l1; l1 << QVariant(QString("Hello")); return l1; } int main(int argc, char *argv[]) { foo(); return 0; }