Hi,
I'm implementing my
void myWidget
::keyPressEvent( QKeyEvent* pe
) {
..code ..
}
void myWidget::keyPressEvent( QKeyEvent* pe )
{
..code ..
}
To copy to clipboard, switch view to plain text mode
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;
}
// start/stop
case Qt::Key_Space:
{
qDebug() << "WaveWidget::keyPressEvent";
bool playing;
m_wave->getCurrentChannel()->isPlaying( &playing );
if( playing == false )
playSound();
else
StopSound();
break;
}
To copy to clipboard, switch view to plain text mode
It simply doesn't work. If I change Key_Space with another key I have no problems.
Which can be the problem?
Bookmarks