Important: Please read the Qt Code of Conduct -

Get rid of Symbian-specific "active widget" frame.

  • On Symbian non-touch phones widgets have a frame drawn around them when they are the currently D-Pad selected widget. I want to get rid of this frame for selected widgets, as it is not needed and confusing in certain cases.


  • Would it work, if you'd loop through all the QApplication's widgets and when encountering QFocusFrame, you would set its visibility off?

    The widget is not stylesheet-able, so fiddling with stylesheets should not help.

  • @
    QList<QFocusFrame*> frames = findChildren<QFocusFrame*>();
    Q_FOREACH(QFocusFrame* frame, frames)
    Didn't find any frames in the parent widget constructor, when it should have found frames for each of four buttons. Maybe the style is creating them on the fly?

    [edit: Code highlighting / Denis Kormalev]

  • QS60Style creates it automatically when it receives first QEvent::FocusIn event.
    Can you try and get it a while later /after constructor but before painting)?

  • I've looked in q60style and I can see that it's just one frame. Tried to hide it in a button click event for tests, but QFocusFrame::setWidget makes it visible again (calls update which calls show).

    Alternative ideas:

    1. inherit custom style from QS60Style and block the frame creation/set in the event() function.
    2. install event filter on app style (is this even possible?)
    3. install event filter on focus frame and block show events
    4. Set the foreground color of the frame to transparent - this one didn't work.

    What do you think?

  • #1 should work (its kinda heavy-handed, but...)
    #2-#3 event filters are of course possible
    #4 based on QS60Style code foreground color is not used (that's QPalette::WindowText), but QPalette::Text is. Wanna check that one?

    How about #5 - report the issue to and lets find a fix for it.

  • Ok, I'll go with #5 :)

  • Did you report it? If you did, please share a link here.

  • Hi, I just opened a suggestion at

  • Okay, thanks for the report. :)

Log in to reply