Is it possible to pass a variable or a value returned by a function as a template argument.

Example:

```
QVariantHash options;
options.insert("fontStyle", fontStyleObject);  // QFont fontStyleObject
options.insert("fontColor", fontColorObject);  // QColor fontColorObject
Q_FOREACH(const QVariant &option, options){
    qDebug() << option.value<option.typeName()>();
}

```

As you saw, I have passed `option.typeName()` as a template argument and that method returns the type of the object as `QString`.

I have already done that but there is an error message: `error: C2974: 'QVariant::value': invalid template argument for 'T', type expected`.

**Is it possible to pass a variable or a value returned by a function as a template argument? and if not, what's the alternative way to do that?**