I’m creating a QNetworkAccessManager object in my project the standard way:
QNetWorkAccessManager *manager = new QNetworkAccessManager (this)
and I am attempting to invoke the get() method but whenever I type the . after the manager object, Qt Creator is inserting a -> instead, so I end up with
manager->
when I want
manager.
Even when I concatenate manager and get() then move the cursor to the right place, Qt Creator still thinks I’m trying to access a sub-object of manager rather than invoke a method. I’ve been all over the ‘Options’ dialogue but I can find any way of disabling this ‘feature’. Does anyone know how to do it?
.and->don’t have anything to do with the difference between “sub-objects” or “methods”. Both function members and field members are accessed in the exact same way..is for accessing members of plain objects, and->is shorthand for accessing members via pointers. In the usual case,a->bis the same as(*a).b.