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

dual arrow artefact when setting QToolButton border: none

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.1.2
    • Widgets: Style Sheets
    • None
    • Windows

    Description

      Whenever setting the border to none the drop down arrow is duplicated according to the appended image.

       

       

       

      Raw code:
       coding: utf-8 

      ################################################################################
      ## Form generated from reading UI file 'ui.ui'
      ##
      ## Created by: Qt User Interface Compiler version 6.1.2
      ##
      ## WARNING! All changes made in this file will be lost when recompiling UI file!
      ################################################################################

      import sys
      from PySide6.QtCore import *  # type: ignore
      from PySide6.QtGui import *  # type: ignore
      from PySide6.QtWidgets import *  # type: ignore

      class Ui_MainWindow(object):
          def setupUi(self, MainWindow):
              if not MainWindow.objectName():
                  MainWindow.setObjectName(u"MainWindow")
              MainWindow.resize(287, 107)
              self.centralwidget = QWidget(MainWindow)
              self.centralwidget.setObjectName(u"centralwidget")
              self.verticalLayout = QVBoxLayout(self.centralwidget)
              self.verticalLayout.setObjectName(u"verticalLayout")
              self.toolButton = QToolButton(self.centralwidget)
              self.toolButton.setObjectName(u"toolButton")
              self.toolButton.setStyleSheet(u"border: none")
              self.toolButton.setCheckable(True)
              self.toolButton.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
              self.toolButton.setArrowType(Qt.DownArrow)

              self.verticalLayout.addWidget(self.toolButton)

              self.verticalSpacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)

              self.verticalLayout.addItem(self.verticalSpacer)

              MainWindow.setCentralWidget(self.centralwidget)
              self.menubar = QMenuBar(MainWindow)
              self.menubar.setObjectName(u"menubar")
              self.menubar.setGeometry(QRect(0, 0, 287, 21))
              MainWindow.setMenuBar(self.menubar)
              self.statusbar = QStatusBar(MainWindow)
              self.statusbar.setObjectName(u"statusbar")
              MainWindow.setStatusBar(self.statusbar)

              self.retranslateUi(MainWindow)

              QMetaObject.connectSlotsByName(MainWindow)
          # setupUi

          def retranslateUi(self, MainWindow):
              MainWindow.setWindowTitle(QCoreApplication.translate("MainWindow", u"MainWindow", None))
              self.toolButton.setText(QCoreApplication.translate("MainWindow", u"hello", None))
          # retranslateUi

      class MainWindow(QMainWindow):
          def _init_(self):
              super(MainWindow, self)._init_()
              self.ui = Ui_MainWindow()
              self.ui.setupUi(self)

      if _name == "main_":
          app = QApplication(sys.argv)

          window = MainWindow()
          window.show()

          sys.exit(app.exec())

      Attachments

        1. Capture.PNG
          Capture.PNG
          2 kB
        2. ui_mainwindow-1.py
          3 kB
        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
            jugge83 Stevan Skrobic
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes