PDA

View Full Version : strange behaviour with Qt key_space



franco.amato
9th April 2010, 23:21
Hi,
I'm implementing my


void myWidget::keyPressEvent( QKeyEvent* pe )
{
..code ..
}

where I catch some keys. I have a problem with the space. I would run a routine when I press the space key so:


// start/stop
case Qt::Key_Space:
{
qDebug() << "WaveWidget::keyPressEvent";
bool playing;
m_wave->getCurrentChannel()->isPlaying( &playing );
if( playing == false )
playSound();
else
StopSound();
break;
}


It simply doesn't work. If I change Key_Space with another key I have no problems.
Which can be the problem?