If you ever got an error something like [some-class] has initialiser but incomplete type, it basically means the compiler cannot understand the type and you need to add the include for it.
QPixmap pixmap(20,10);
pixmap.fill(Qt::white);
QPainter painter(&pixmap);
QPen pen(Qt::blue);
Take the code snipped above when you compile it you might get an error something along the lines of the following for line 4.
‘QPainter painter’ has initialiser but incomplete type
To fix this you need to include the header file where QPainter is defined. The updated code looks like:
#include <qpainter.h>
QPixmap pixmap(20,10);
pixmap.fill(Qt::white);
QPainter painter(&pixmap);
QPen pen(Qt::blue);
Similar posts to check out:
- May 19, 2012 -- Metro Apps in C++ anyone? (0)
In Visual Studio “11” when I try and create a new C++ Metro app using the built-in template, I get the following error: “Can’t find localized resources”. I wonder if anyone else has managed to get around this? I am running the Consumer Preview Build of Win 8 (Build 8250). ... - April 14, 2012 -- AWS Extension for Visual Studio (0)
I had forgotten that I had the AWS Extension for Visual Studio installed until recently I noticed AWS Explorer item in the View menu option. This add-in allows you to explore the various features that Amazon exposes right from within Visual Studio. The toolkit makes it easier for developers to debug and deploy a .NET solutions that uses AWS. When you install this, you also get AWS SDK for .NET which provides one with all the building blocks that are required for consuming the IaaS services ex... - May 26, 2011 -- Troubleshooting WCF Performance – Part 1 (0)
More related details on Dustin's post - WCF scales up slowly with bursts of work....
Tags: .code