[Qt-embedded-interest] Hardware cursor implementation

Tom Cooksey thomas.cooksey at nokia.com
Tue Jul 7 10:34:17 CEST 2009


> Tom Cooksey wrote:
> > http://doc.trolltech.com/4.5/qscreencursor.html
>
> Thank you so much. I swear I serached the doc a lot and I could not
> find this.
>
> It doesn't look hard to subclass this and implement my hardware
> calls; anyway, I still do not understand how to have my system use
> this class and not the "standard" software one. How to build and
> test?

http://doc.trolltech.com/4.5/qscreencursor.html#details

"Typically, the cursor is constructed by the QScreen class or one of 
its descendants when it is initializing the device;"

Subclass QLinuxFBScreen and instanciate your custom cursor in 
initDevice():


class MyScreen : public QLinuxFBScreen
{
public:
	bool initDevice() {
		cursor = new MyCursor;
		return QLinuxFBScreen::initDevice();
	}

private:
	MyCursor *cursor;
}

Something like that might work anyway...


Cheers,

Tom



More information about the Qt-embedded-interest mailing list