Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63696

{macOS} Regression: setting stylesheet on QTabWidget::pane hides the close graphic on tab

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.2, 5.10.0 Beta 1
    • Widgets: Style Sheets
    • None
    • macOS 10.12.6
    • macOS

    Description

      Setting a stylesheet for QTabWidget::pane will cause the close "X" to not be displayed on the tab.

      Using the dialogs/tabdialog example, add the following two lines in tabdialog.cpp after the QTabWidget (tabWidget) is created:

      tabWidget->setTabsClosable( true );
      setStyleSheet( "QTabWidget::pane { margin: 0 0 0 0; }" );
      

      It doesn't seem to matter what I am setting in the style sheet, the close "X" graphic will not be displayed anymore. Remove the setStyleSheet call and the "X" is displayed.

      I have not been able to come up with a workaround for this. It stopped working with 5.9.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            asm Andy M
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes