/dev/input/



  • Hi All

    How to read event files from the path "/dev/input/".
    When I try to read it in my application

    @
    QFile f("/dev/input/event2");
    qDebug()<< "Opening......."<<endl;
    bool  bRet =  f.open(QIODevice::ReadOnly ) ;
    
    if( bRet )
    {
       qDebug()<< "Reading........"<<endl;
    }
    else
    {
        qDebug()<<"File open Failed"<<endl;
        bRet = false;
    }
    

    @

    It always showing "File open Failed" .

    please help



  • Make sure you have read permissions to it.



  • [quote author="AcerExtensa" date="1337085402"]Make sure you have read permissions to it.[/quote]

    And the file exists, in the right directory (probably does, but you never know)



  • Try to access this file as root. On most linux systems, only root has access to /dev/input devices


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.