Important: Please read the Qt Code of Conduct -

Connect something with a slot and also sent a QVariant..

  • lets say for example we want to use the QTimer::singleShot to call a function but also send a qvariant, its impossible..
    all i can do is

    @QTimer::singleShot(200, this, SLOT(function_name()));@

    when i wanted something like
    @QString hello="hello world";
    QTimer::singleShot(200, this, SLOT(function_name(hello)));@

  • Moderators

    Not quite in that way. You can, however, subclass QTimer and add a QVariant member to that class. Then it should work, sure.

Log in to reply