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

Radio buttons/checkboxes in QWebView broken if using stylesheet in a QTabWidget

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.4.1
    • 5.2.0, 5.3.1
    • None
    • Windows 7

      When using QWebView inside a QTabWidget and setting any stylesheet on the QTabWidget, checkboxes and radio buttons on websites act weird.

      I don't write C++, but this PyQt code reproduces the behaviour:

      import sys
      
      from PyQt5.QtCore import QUrl
      from PyQt5.QtWidgets import QApplication, QTabWidget
      from PyQt5.QtWebKitWidgets import QWebView
      
      app = QApplication(sys.argv)
      tabwidget = QTabWidget()
      tabwidget.setStyleSheet("""
          QTabBar::tab {
              color: red;
          }
      """)
      webview = QWebView()
      webview.load(QUrl("http://www.echoecho.com/htmlforms10.htm"))
      tabwidget.addTab(webview, "test")
      tabwidget.show()
      app.exec_()
      

      The attached video shows what I mean. (I hope it is attached - the check box is rendered as unchecked).

      It does not happen when not setting a stylesheet, and doesn't happen on Archlinux (so QWebKit + Stylesheet style + Windows style?). I also couldn't reproduce it in a quick test with a QGroupBox and QRadioButtons.

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

            allan.jensen Allan Sandfeld Jensen
            the compiler Florian Bruhin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes