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

QMessageBox buttons too narrow #326

Open
jakeanq opened this issue Dec 13, 2022 · 0 comments
Open

QMessageBox buttons too narrow #326

jakeanq opened this issue Dec 13, 2022 · 0 comments

Comments

@jakeanq
Copy link

jakeanq commented Dec 13, 2022

Describe Your Environment

qdarkstyle --all ``` /home/jake/rsp-testing/lib/python3.10/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py:142: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives return original_import(name, *args, **kwargs) * OPERATING SYSTEM--------------------------------------------------------------- - System........................ Linux - Release....................... 6.0.9-arch1-1 - Platform...................... Linux-6.0.9-arch1-1-x86_64-with-glibc2.36 - Version....................... #1 SMP PREEMPT_DYNAMIC Wed, 16 Nov 2022 17:01:17 +0000 * PYTHON DISTRIBUTION------------------------------------------------------------ - Version....................... 3.10.8 - C Compiler.................... GCC 12.2.0 - C API Version................. 1013 - Implementation................ cpython - Implementation Version........ 3.10.8 * QT BINDINGS-------------------------------------------------------------------- - PyQt5 Version................. 5.15.7 - PyQt5 Qt Version.............. 5.15.2 - PySide2 Version............... 5.15.2.1 - PySide2 Qt Version............ 5.15.2 * QT ABSTRACTIONS---------------------------------------------------------------- - qtpy Version.................. 1.11.3 - qtpy Binding.................. pyqt5 - qtpy Binding Variable......... os.environ['QT_API'] - qtpy Import Name.............. qtpy - qtpy Status................... OK - Qt Version.................... 1.3.6 - Qt Binding.................... PySide2 - Qt Binding Variable........... Qt.__binding__ - Qt Import Name................ Qt - Qt Status..................... OK * PYTHON PACKAGES---------------------------------------------------------------- - helpdev....................... 0.7.1 - QDarkStyle.................... 3.1 ```

Language

Python

Description / Steps to Reproduce

Using QMessageBox.question with a short example text and several buttons collapses one of the buttons - see the example code below.

If commenting out the setStyleSheet line, everything looks good.

Using PySide2 or a different computer also exhibits the issue.

Actual Result

The left button is cut off:

image

Expected Results / Proposed Result

The layout should look like this (but with the dark theme ;) )
image

Relevant Code

from PySide2 import QtWidgets
import sys
import qdarkstyle

if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)
    app.setStyleSheet(qdarkstyle.load_stylesheet(qt_api="pyside2"))
    QtWidgets.QMessageBox.question(
            None,
            "ExampleApp9000",
            "You have 42 unsaved changes",
            QtWidgets.QMessageBox.Save | QtWidgets.QMessageBox.Discard | QtWidgets.QMessageBox.Cancel,
            )
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