
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We're experiencing some focus issues that happen to slow down our artists tremendously "when it happens".
Let's describe the setup:
- we have a scripted panel in one of the view panes
- it contains a form layout, which in turn hosts our custom QWidget (a text editor with its own clipboard)
Say the user selects a mesh in a viewport and presses CTRL+C on accident. He then continues to move the mouse over our panel and presses CTRL. The panel immediately gets a thin border painted around - which should indicate the panel has focus. If he then presses CTRL+V, the mesh gets copied into the scene.
As the border around the scripted panel indicates focus, we'd expect it to use the internal text-clipboard and insert text.
I've done further investigations, installing event filters on all parents of our QWidget up to and including the scriptedPanels parent layout. NONE of them receives FocusInEvents when pressing CTRL. Also checking via QWidget::hasFocus() yields "false". This explains why the copying happens.
The only events the widgets receive are "enter/leave" and "paint" events (ok, also tooltip events ...).
Can anybody tell how I can get ahold of that "soft focus" of Maya, to set the "hard focus" to my editor?
Solved! Go to Solution.