[Differential] [Changed Subscribers] D4287: File templates assistant: focus first edit field on switch to new page
noreply at phabricator.kde.org
Sun Jan 29 20:10:49 UTC 2017
mwolff added inline comments.
> kossebau wrote in templateclassassistant.cpp:519
> Good point, I forgot to ask some questions I have about this:
> 1. The repeated explicit calls could be avoided by making `setFocusToFirstEditWidget()` a part of the interface. What would be the best (KDevelop) style here: a) add an abstract interface which all pages would optionally implement and which would be queried here first or b) add another subclass with that abstract method added which all pages need to subclass from?
> 2. Would it make more sense to set the first edit widget as focus proxy to the page container? So there is no need for a special call with a given semantic `setFocusToFirstEditWidget()` here we just need to call setFocus() on the page? That approach would also mean any click in the page background would set the keyboard focus to the first edit widget, is that expected?
1. The pages are under our control, right? so it's not an optional feature? So adding an interface for that would make sense to me.
2. I have no clue about focus proxies
but, in general, isn't there a way to set the widget focus from designer and couldn't that be used instead of all this manual code?
To: kossebau, #kdevelop
Cc: mwolff, arrowdodger, kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KDevelop-devel