Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QDateEdit Popup too small, wrong colors for weekends #322

Open
oleschum opened this issue Nov 17, 2022 · 0 comments
Open

QDateEdit Popup too small, wrong colors for weekends #322

oleschum opened this issue Nov 17, 2022 · 0 comments

Comments

@oleschum
Copy link

Describe Your Environment

* OPERATING SYSTEM---------------------------------------------------------------
    - System........................ Linux
    - Release....................... 5.15.0-53-generic
    - Platform...................... Linux-5.15.0-53-generic-x86_64-with-glibc2.35
    - Version....................... #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022
* PYTHON DISTRIBUTION------------------------------------------------------------
    - Version....................... 3.10.6
    - C Compiler.................... GCC 11.3.0
    - C API Version................. 1013
    - Implementation................ cpython
    - Implementation Version........ 3.10.6
* QT BINDINGS--------------------------------------------------------------------
    - PySide2 Version............... 5.15.2.1
    - PySide2 Qt Version............ 5.15.2
* QT ABSTRACTIONS----------------------------------------------------------------
    - qtpy Version.................. 2.3.0
    - qtpy Binding.................. pyside2
    - qtpy Binding Variable......... os.environ['QT_API']
    - qtpy Import Name.............. qtpy
    - qtpy Status................... OK
* PYTHON PACKAGES----------------------------------------------------------------
    - helpdev....................... 0.7.1
    - QDarkStyle.................... 3.1

  • PySide2 and Pyside6

Language

Python

Description / Steps to Reproduce

The calendar popup of the widget QDateEdit is too small and has incorrect coloring.
Weekends are not consistently colored red.
The root cause seems to lie in the QCalendarWidget that is used by QDateEdit's popup.

Actual Result

dateedit_qdarkstyle

Expected Results / Proposed Result

More space for the popup so that no parts are cut off and red colors for the weekend in a consistent manner.

Relevant Code

MWE to reproduce this:

from PySide2 import QtWidgets
import qdarkstyle

class DateEditGui(QtWidgets.QMainWindow):
    def __init__(self):
        super().__init__()
        widget = QtWidgets.QWidget()
        self.vertical_layout = QtWidgets.QVBoxLayout()

        self.date_picker = QtWidgets.QDateEdit()
        self.date_picker.setCalendarPopup(True)

        # self.calendar = QtWidgets.QCalendarWidget()

        self.vertical_layout.addWidget(self.date_picker)
        self.vertical_layout.addWidget(self.calendar)

        widget.setLayout(self.vertical_layout)
        self.setCentralWidget(widget)


app = QtWidgets.QApplication()
app.setStyleSheet(qdarkstyle.load_stylesheet(qt_api='pyside2'))
window = DateEditGui()
window.show()
app.exec_()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant