Important: Please read the Qt Code of Conduct -


  • 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 = ) ;
    if( bRet )
       qDebug()<< "Reading........"<<endl;
        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