[Kde-games-devel] compiling kblocks
Ian Wadham
ianw2 at optusnet.com.au
Tue Dec 18 11:06:32 CET 2007
On Tue, 18 Dec 2007 07:28 pm, Dapeng Zhang wrote:
> It is a very nice trick. However, there is a blank "view" in kblocks and
> it complain the following
>
> QPixmap::fromImage: Cannot convert a null image.
>
> I can figure it out later...
>
In KDE 4 games we are loading graphics from SVG (Scalable Vector
Graphics - files *.svg or *.svgz), using KSvgRenderer and/or
QSvgRenderer classes. They get loaded into QImage objects at
whatever the current scale is, then they are converted to QPixmap
form for use in the actual gameplay and animations.
All this should work if "make install" has put the SVG files in the
right spot. It looks as though the SVG loading is failing in your case.
Once it works, it should go on working whenever you redo "make" and
run "./kblocks".
There is a README file in kdegames/kgoldrunner/themes that
gives more detail on how SVG themes work in KGoldrunner. Other
games have similar READMEs, with different details, but all working
roughly the same way.
Cheers, Ian W.
More information about the kde-games-devel
mailing list