Transient scrollbars issue (Mac)



  • When I plug my wireless mouse receiver into the USB port of my MacBook Pro; the scrollbars in my application change from "transient" type to Qt::ScrollBarAlwaysOn.

    The problem is, I use a dark theme on my application and don't theme the scrollbars. Transient type are automatically alpha composited while always on type use the standard light grey on white which looks out of place (i.e. very ugly).

    Is there any way I can

    a. Force scrollbars to remain transient type; application wide ?
    or
    b. Theme scrollbars, but only non-transient type ?


  • Lifetime Qt Champion

    Hi,

    What part of your application ?
    What version of Qt ?
    What version of macOS ?
    What version of Xcode ?



  • @SGaist

    1. Anything inheriting QAbstractScrollArea, in QMainWindow or QDialog
    2. Verified with 5.5 and 5.9.1
    3. MacOS X 10.11.6
    4. I'm not "using Xcode", but development tools report Apple LLVM version 8.0.0 (clang-800.0.42.1) and installed Xcode is 8.2.1.

    I strongly suspect this issue affects a wide variety of versions because I have intermittently been tracing this problem for a long time before I realised today that it's because the mouse receiver was connected; I rarely use a mouse.



  • My guess is that MacOS decides that mouse cannot scroll horizontally; therefore if a mouse is connected then transient scrollbars cannot be used.

    I tried styling scrollbars, but when the mouse is disconnected they are composited on top of my widget and look ugly.

    The only option I can see to have consistent and reasonable looks is to change to scrollbars always on and try to style similar to MacOS.

    Is there a way to style scrollbar arrows so they don't appear ?


  • Lifetime Qt Champion

    What kind of receiver/mouse combo are you using ?



  • @SGaist

    It's Logitech.

    But I think this happens anytime a mouse is plugged in; I think I may have seen the same thing with the Apple Mega mouse when I was testing my software in the Apple store, but I didn't realise it at the time.

    What I really need now is to be able to style QScrollBars so they look native or work out how to set native scrollbar colours.



  • I believe that transient scrollbars aren't implemented in Qt so started a new issue in JIRA https://bugreports.qt.io/browse/QTBUG-63381


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.