ColinDuquesnoy / QDarkStyleSheet

A dark style sheet for QtWidgets application
Other
2.81k stars 729 forks source link

QComboBox expands selected item #282

Closed Gabsha closed 2 years ago

Gabsha commented 3 years ago

Describe Your Environment

* OPERATING SYSTEM---------------------------------------------------------------
    - System........................ Linux
    - Release....................... 5.4.0-73-generic
    - Platform...................... Linux-5.4.0-73-generic-x86_64-with-glibc2.29
    - Version....................... #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021
* PYTHON DISTRIBUTION------------------------------------------------------------
    - Version....................... 3.8.5
    - C Compiler.................... GCC 9.3.0
    - C API Version................. 1013
    - Implementation................ cpython
    - Implementation Version........ 3.8.5
* QT BINDINGS--------------------------------------------------------------------
    - PyQt5 Version................. 5.15.4
    - PyQt5 Qt Version.............. 5.15.2
* QT ABSTRACTIONS----------------------------------------------------------------
    - qtpy Version.................. 1.9.0
    - qtpy Binding.................. pyqt5
    - qtpy Binding Variable......... os.environ['QT_API']
    - qtpy Import Name.............. qtpy
    - qtpy Status................... OK
* PYTHON PACKAGES----------------------------------------------------------------
    - helpdev....................... 0.7.1
    - QDarkStyle.................... 3.0.2

Description / Steps to Reproduce

Although it's been reported in #200 and marked as solved, I am still experiencing this issue in version 3.0.2

Launching the example qdarkstyle.example yields the following behavior on my system:

qdarkstyle_combobox

Relevant Code

Here's a MWE that replicates my issue too:

import sys

import qdarkstyle
from PyQt5.QtCore import QSize
from PyQt5.QtWidgets import QApplication, QComboBox, QVBoxLayout, QWidget

class Demo(QWidget):
    def __init__(self):
        super().__init__()
        self.setup_ui()

    def setup_ui(self):
        self.combo = QComboBox()
        self.combo.addItems(["A", "B", "C"])

        self.lay = QVBoxLayout()
        self.lay.addWidget(self.combo)

        self.setLayout(self.lay)

        self.show()

    def sizeHint(self):
        return QSize(300, 300)

if __name__ == "__main__":
    app = QApplication(sys.argv)
    app.setStyleSheet(qdarkstyle.load_stylesheet(qt_api="pyqt5"))
    demo = Demo()
    demo.show()
    sys.exit(app.exec_())
leviethung2103 commented 3 years ago

I also had the same problem. Is they any progress ?

Tsubajashi commented 2 years ago

Any News regarding this issue? it works on windows, but not on my linux machine. its the best looking stylesheet out there... dont really wanna change it.

pierreduf commented 2 years ago

Hi. I had the same problem. After some time fiddling around I simply removed that part and it worked:

image

I also updated to the latest version but I'm pretty sure it didn't work after the update without removing that part.

Hope that helps.

dpizetta commented 2 years ago

Hi guys, could you please check if this was solved within the last version? Tks a lot!

Gabsha commented 2 years ago

Hi @dpizetta, retrying the same MWE I shared, it's fixed on my side :tada: Thanks!