Command Pattern

  • Hello! I want to use QVariant for dynamic type identification.
    void hello(int a)

    std::function<void(int)> variant = hello; //It's ok
    std::function<QVariant(QVariant)> newVariant = hello; //error.
    How can I use QVariant for this?
    typedef std::function<QVariant(QVariant)> Function;

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.