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 26, 2011 -- Troubleshooting WCF Performance – Part 1 (0)
More related details on Dustin's post - WCF scales up slowly with bursts of work.... - May 23, 2011 -- PowerShell script to kill named processes (0)
There are times when you need to kill a number of processes in one-go like today when Chrome crashed a few times hanging all the running instances – next time Google says, one tab cannot bring down all of them – send them my way :). For such times, a PowerShell script is all you need.
I wrote up a simple one which takes the process name as input and then kills all the processes which match that name.
[sourcecode lang="PowerShell" toolbar="true"]
#Script is not signed, so need this.
Set-... - March 4, 2011 -- Twitter Trends (0)
I was excited to find that Twitter had a JSON (Javascript Object Notation) endpoint for the current trending topics and decided to write a simple consumer which can read this and then spit it out in a simple console. And JSON being so simple and more or less “universal” meant that there are multiple implementations for .NET. Of course if you got lots of bandwidth you can roll out your own parser.
I ended up using Json.NET, which in addition to being OpenSource is also one of the most robust u...
Tags: .code