More specifically, here\'s what I\'m trying, but as you can see by the comment, the screen flickers momentarily.
Trigger::Trigger( QWidget *parent, const char *name, WFlags fl )
: QWidget( parent, name, WStyle_Customize | WStyle_NoBorderEx )
{
p_sdgms = sdgms_init( \"/dev/sdgmhs0\", SDGMS_VERSION );
if (p_sdgms == NULL)
{
QMessageBox::critical(0, \"Not Detected\",
\"The scanner cannot be detected. Please make sure it \"
\"is securely plugged in and try again.\");
exit(1);
}
if (sdgms_open( p_sdgms ) != SDGMS_SUCCESS)
{
QMessageBox::critical(0, \"Not Detected\",
\"The scanner cannot be detected. Please make sure it \"
\"is securely plugged in and try again.\");
exit(1);
}
setFixedSize(0,0); // don\'t make widget appear, screen flickers :-(
setDisabled(TRUE);
QTimer::singleShot( 0, this, SLOT(scanon()) );
}
Trigger::~Trigger( void )
{
sdgms_shutdown( p_sdgms );
}
void
Trigger::scanon( void )
{
(void) sdgms_trigger( p_sdgms, SDGMS_TRIGGER_ON, NULL, NULL );
}