QT application (SI_POLL problem)

Questions and answers about 3Dconnexion devices on Windows.

Moderator: Moderators

Post Reply
versatophon
Posts: 3
Joined: Fri Feb 23, 2007 4:41 am
Contact:

QT application (SI_POLL problem)

Post by versatophon »

Hello,
I develop a QT application under Windows XP and I want to use SI_POLL to get informations from my spacemouse. The problem is SiOpen function returns SI_BAD_VALUE and I don't kwon why.

Code: Select all

SiOpenData oData;

	if (SiInitialize() == SPW_DLL_LOAD_ERROR)  
	{
		button1->setCheckState(Qt::Checked);//to check errors
	 } else if ((spaceHandler = SiOpen("SpaceMouse", SI_ANY_DEVICE, SI_NO_MASK, SI_POLL, &oData)) == NULL) {
		 button2->setCheckState(Qt::Checked);//to check errors
	 } else {
		SiClose(spaceHandler);
	 }


With SI_POLL, if I don't use a SiOpenData, the program crashes.

I maybe made something wrong. Someone could explain to me what is the problem??
Versatophon
/****************
* RV - developper *
****************/
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

Hi versatophon,

SI_POLL has not been implemented. Only the event-driven model works. If needed, you might want to set up a separate thread to get the events from the device.

Jim
3Dx Software Development
versatophon
Posts: 3
Joined: Fri Feb 23, 2007 4:41 am
Contact:

Post by versatophon »

Thank you for your answer.
Versatophon
/****************
* RV - developper *
****************/
Post Reply