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:
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;
}
};
}
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;
}
};
}
To copy to clipboard, switch view to plain text mode
Bookmarks