Important: Please read the Qt Code of Conduct -

Problem with QTabWidget not displaying correctly on OSX

  • Hi Everyone,

    I am working on cross platform project using Qt.
    The primary development is done on windows, and i am doing the OSX port.
    I have run into a problem i cannot solve related to QTabWidget.
    The QTabWidget displays incorrectly on OSX, more specifically it is basically unusable at all on OSX. Here is a picture of how it looks on windows and that you can easily see the text for both tabs..!0_1513313019550_ok on windows.png

    Now on OSX the tab title bar goes all the way across the UI making the 2nd tab title almost invisible, and unusable..
    (ignore the fact the windows has the Codec and other icon, and it has an X at the end on mac)
    0_1513313088720_Problem on Mac.png
    Basically the tab title is drawn almost all the way across the width of the Tab,
    making it impossible to see the tab title text for the second tab!

    lastly here is a pic of the layout in Qt designer showing the structure of the different elements and how it is correctly displayed within the QT designer environment..
    0_1513313176569_layout in Mac Qt designer.png

    I have tried modifying a number of different properties, changing sizes, restrictions etc. but nothing i do seems to work. I think it is somehow related to having a QtabWidget inside a splitter?? But if it works on windows it should work on OSX right? unfortunately due to the cross platform nature of the project, I cannot just rebuild the GUI such that it works on OSX, as the windows version is already shipping.

    Anyway i would be most thankful for any help/insight/advice anyone can provide. I'm clearly not a Qt or GUI expert, but a half decent programmer, and always willing to learn more,


  • Hi,
    Have you tried removing splitter from the frameMediaBin?

  • Lifetime Qt Champion

    That is a bit odd.
    Does it happen with no style sheet?

  • Looks like it was related to the style sheet!

    I have yet to identify specifically which part of the style sheet is the problem.
    if i do i will update,

Log in to reply