IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

<QOverload>

Qt Core Reference Documentation.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Function Documentation

 

auto qConstOverload(T memberFunctionPointer)

Returns the memberFunctionPointer pointer to a constant member function:

 
Sélectionnez
    struct Foo {
        void overloadedFunction(int, const QString &amp;);
        void overloadedFunction(int, const QString &amp;) const;
    };
    ... qConstOverload&lt;int, const QString &amp;&gt;(&amp;Foo::overloadedFunction)
    ... qNonConstOverload&lt;int, const QString &amp;&gt;(&amp;Foo::overloadedFunction)

See Also

auto qNonConstOverload(T memberFunctionPointer)

Returns the memberFunctionPointer pointer to a non-constant member function:

 
Sélectionnez
    struct Foo {
        void overloadedFunction(int, const QString &amp;);
        void overloadedFunction(int, const QString &amp;) const;
    };
    ... qConstOverload&lt;int, const QString &amp;&gt;(&amp;Foo::overloadedFunction)
    ... qNonConstOverload&lt;int, const QString &amp;&gt;(&amp;Foo::overloadedFunction)

See Also

auto qOverload(T functionPointer)

Returns a pointer to an overloaded function. The template parameter is the list of the argument types of the function. functionPointer is the pointer to the (member) function:

 
Sélectionnez
    struct Foo {
        void overloadedFunction();
        void overloadedFunction(int, const QString &amp;);
    };
    ... qOverload&lt;&gt;(&amp;Foo::overloadedFunction)
    ... qOverload&lt;int, const QString &amp;&gt;(&amp;Foo::overloadedFunction)

If a member function is also const-overloaded qConstOverload and qNonConstOverload need to be used.

See Also

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+