Quote Originally Posted by wysota View Post
Does it work on Windows if you try to scroll using the cursor keys without first making the scroll area have focus? I doubt that. If you want to send key events to some widget, this widget needs to have focus. If you want to avoid that, install an event filter on your other widgets and forward cursor key events to the scroll area. You can install an event filter on the application object to intercept all events in your application. Just prevent falling into an infinite loop when forwarding the events to the scroll area - your filter will catch those as well. Note that you shouldn't need to do that if you don't have any widgets accepting focus outside or inside the scroll area.
- Yes it work on Windows if I try to scroll using the cursor keys without first making the scroll area have focus.
- I try to set focus on the scroll area
Qt Code:
  1. void Widget::keyPressEvent(QKeyEvent* aEvent)
  2. {
  3. iScrollArea->setFocus();
  4. qDebug( "Widget::keyPressEvent." );
  5. }
To copy to clipboard, switch view to plain text mode 
but it does not work.
- how to forward events to specified widget?