QT application (SI_POLL problem)

Questions and answers about 3Dconnexion devices on Windows

Moderator: Moderators

QT application (SI_POLL problem)

Postby versatophon » Fri Feb 23, 2007 5:02 am

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 *
****************/
versatophon
 
Posts: 3
Joined: Fri Feb 23, 2007 4:41 am

Postby jwick » Fri Feb 23, 2007 7:20 am

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
jwick
Moderator
Moderator
 
Posts: 1756
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA

Postby versatophon » Fri Feb 23, 2007 9:09 am

Thank you for your answer.
Versatophon
/****************
* RV - developper *
****************/
versatophon
 
Posts: 3
Joined: Fri Feb 23, 2007 4:41 am


Return to Windows Discussion Forum

Who is online

Users browsing this forum: No registered users and 0 guests