I have a quick question about the QPainter examples I have seen. The syntax seems strange and doesn't look like it should compile.
QPainter painter(this);
To copy to clipboard, switch view to plain text mode
I would expect this to be something like:
QPainter painter = new QPainter(this);
To copy to clipboard, switch view to plain text mode
or even something like this:
QPainter painter = QPainter::fromWidget(this);
To copy to clipboard, switch view to plain text mode
But instead it looks like a syntax error. So how and why does this work? I'm from C# and still a beginner with C++ and Qt, so thanks in advance for answering such newbie question
Bookmarks