Results 1 to 3 of 3

Thread: Preventing blue focus rectangle

  1. #1
    Join Date
    Mar 2007
    Posts
    74
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Preventing blue focus rectangle

    Hi,

    I have a QTabWidget placed on a dialog with
    several other controls. It has been requested
    that the QTabWidget not show the blue focus rectangle
    when it's border is clicked.

    I have set the focus policy to setFocusPolicy(Qt::NoFocus)
    but that has no effect.

    How can I accomplish this and why does the setFocusPolicy()
    not accomplish this?

    Many Thanks!

  2. #2
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Thanks
    7
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Preventing blue focus rectangle

    hi,
    are you sure that rectangle comes from tabWidget? you can have focusPolicy set on one of "page" widgets. Is this rectangle inside of page? (i remember that in my app tabWidget showed focus on current tab's label not on whole tab widget)
    See GrEEn (Graphics Effects Environment)
    http://sourceforge.net/project/platf...roup_id=232746
    a qt-based plugins oriented MDI image processing application(contains also qt plugins like styles & imageformats).

  3. #3
    Join Date
    Mar 2007
    Posts
    74
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Preventing blue focus rectangle(Solved)

    You are correct. The focus rectangle was actually coming from a QScrollArea on the page.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.