Search code examples
qtqt4.7

How to represent "." with Qt::Key_ enum?


I checked document , but i didn't seem to find the corresponding enum definition for . , which Qt::Key_ is that ?

Thanks


Solution

  • I've run a small modification to code I had to capture the value. It comes as 46 decimal, which corresponds to Key_Period = 0x2e in qnamespace.h

    bool MyClass::event( QEvent* e )
    {
        if ( e->type() == QEvent::KeyPress )
        {
            QKeyEvent* ev = dynamic_cast<QKeyEvent*>( e );
            int debug = ev->key();
        }
        return QDialog::event( e );
    }