Left sidebar like category



  • Hi,
    How can I do samething like that picture in PyQt5?
    (it's will be like qlistwidget)
    picture
    same picture
    img: https://imgur.com/a/JmGGQXJ



  • Solved with QListWidget
    self.listWidget = QtWidgets.QListWidget(self.tab_5)
    self.listWidget.setGeometry(QtCore.QRect(10, 90, 171, 211))
    self.listWidget.setStyleSheet("QListWidget {background-color: #363636}\n"
    "\n"
    "QListWidget::item {\n"
    "background-color: rgb(54, 54, 54);\n"
    "height: 40px;\n"
    "color: white;\n"
    "padding-left:15px;\n"
    "}\n"
    "\n"
    "QListWidget::item:hover {\n"
    "background-color: rgb(255, 255, 255);\n"
    "height: 40px;\n"
    "color: #363636;\n"
    "padding-left:15px;}")
    self.listWidget.setFrameShape(QtWidgets.QFrame.NoFrame)
    self.listWidget.setObjectName("listWidget")


 

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