Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Compiling ok: @QUrl u; u.setHost("127.0.0.1");@
@QUrl u(""); u.setHost("127.0.0.1");@
Compile error: @QUrl u(); u.setHost("127.0.0.1");@
request for member 'setHost' in 'u', which is of non-class type 'QUrl()'
What is wrong with this?
Syntax is incorrect. This should not work for all C++ classes, not only Qt classes.
You need to use the parentheses only when you specify any arguments do an assignment like this: @ QUrl u; ... u = QUrl(); @