PDA

View Full Version : Volume Keys on Nokia N8



abashir
6th January 2011, 22:51
Is there a way to access the volume keys on an N8 using QT?

I am using the following code but am unable to get a response.





HEADER
const int EKeyIncVolume = 63552;
const int EKeyDecVolume = 63553;

public:
void keyPressEvent(QKeyEvent *);


MAIN

#include <QKeyEvent>

void MainWindow::keyPressEvent(QKeyEvent* event)
{
switch (event->nativeVirtualKey())
{
case EKeyIncVolume:
{
this->ui->label->setText("Up");
break;
}
case EKeyDecVolume:
{
this->ui->label->setText("Down");
break;
}
};
}

burcuh
25th March 2011, 11:22
Hi Abashir, did you find any solution for this issue? I'm also having the same problem.

abashir
25th March 2011, 17:33
Hi Abashir, did you find any solution for this issue? I'm also having the same problem.

QT doesn't support this - so I changed how I implemented my app and used a settings dialog instead - works fine now