Hi,
I have a doubt regarding focus. Maybe this is not a Qt related topic, if so sorry in advance.
I have a Widget inherited from QWidget having some children ( push buttons and other widgets ).
So:
Qt Code:
{ Q_OBJECT public: virtual ~WaveWidget(); public slots: void playSound(); void stopSound(); void zoomIn(); void zoomOut(); void setZoomFactor( float f ); signals: void zoomFactorChanged( float ); protected: private: WaveDisplay* m_WaveDisplay; PanelInfo* m_panel; SoundData* m_wave; QPushButton* button1; QPushButton* button2; QPushButton* button3; QPushButton* button4; QPushButton* button5; QPushButton* button6; QPushButton* button7; QPushButton* button8; QPushButton* button9; QPushButton* button10; QPushButton* m_zoomInBtn; QPushButton* m_zoomOutBtn; QLabel* m_titleLabel; QLed* m_statusLed; float m_ZoomFactor; };To copy to clipboard, switch view to plain text mode
The WaveWidget should react to keyboard keys pressed ( I reimplemented keyPressEvent ).
If initially WaveWidget has focus, pressing tab the focus pass to it's children. In this case WaveWidges still react to keyboard keypressed?
I would like yes, but I don't know how to implement such behaviour.
Best Regards
Bookmarks