GTBuilder
2nd August 2008, 15:28
I'm using the following function:
void Clone::keyPressEvent( QKeyEvent *event)
{
switch ( kbdItem)
{
case getDriveLetter:
driveLetterProcess( event->text());
break;
case okNotMounted:
notMountedProcess();
break;
case okDeleteFolder:
deleteFolderProcess( event->key());
break;
default:
;
}
}
If I press the spacebar, the function ignores the input for the getDriveLetter and okDeleteFolder cases.
For the okNotMounted case, I ask the user to, "Press any key to continue." If spacebar is selected, rather then entering the notMountedProcess(), the function re-enters the driveLetterProcess( event->text()).
Works fine for any other key press.
:confused:
void Clone::keyPressEvent( QKeyEvent *event)
{
switch ( kbdItem)
{
case getDriveLetter:
driveLetterProcess( event->text());
break;
case okNotMounted:
notMountedProcess();
break;
case okDeleteFolder:
deleteFolderProcess( event->key());
break;
default:
;
}
}
If I press the spacebar, the function ignores the input for the getDriveLetter and okDeleteFolder cases.
For the okNotMounted case, I ask the user to, "Press any key to continue." If spacebar is selected, rather then entering the notMountedProcess(), the function re-enters the driveLetterProcess( event->text()).
Works fine for any other key press.
:confused: