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

Title bar of DockWidget is not high enough and title is not fully displayed #314

Open
ai-quantum opened this issue Jun 9, 2022 · 2 comments

Comments

@ai-quantum
Copy link

图片
图片
图片
图片

Describe Your Environment

  • QDarkStyle: 3.0.2
  • OS:Windows10
  • Python:3.9
  • PyQt:5

Language

Python

Relevant Code [if necessary]

[A piece of code to reproduce and/or fix this issue]

import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *

import qdarkstyle
from qdarkstyle.light.palette import LightPalette

class Test(QMainWindow):
    def __init__(self, parent = None):
        super(Test, self).__init__(parent)

        self.setCentralWidget(QTextEdit())

        self.dock = QDockWidget("dock", self)

        self.setWindowTitle("Dock demo")
        

def main():
    app = QApplication(sys.argv)
    app.setStyleSheet(qdarkstyle.load_stylesheet(qt_api='pyqt5', palette=LightPalette()))
    ex = Test()
    ex.show()
    sys.exit(app.exec_())
     
if __name__ == '__main__':
    main()

@ughstudios
Copy link

Did you ever manage to figure this out?

@Anderson-312
Copy link

Anderson-312 commented Jun 4, 2024

I meet the same question. I tried some stylesheet like following, it didn't work!
The raw results are as follows.
1717511977422

  1. code 1
self.dock_demo.setStyleSheet(
    """
    QDockWidget::title {
        padding-top: 10px; /* Adjust this value to increase/decrease height */
        padding-bottom: 10px; /* Adjust this value to increase/decrease height */
    }
    """
)

The result is that the padding does change, but it doesn't help the problem.
1717511787749
2. code 2

self.Log_dock.setStyleSheet("QDockWidget::title{height: 80px;}")

The result is no change.
1717511947865

My Environment is:

  • QDarkStyle: 3.2.3
  • OS: Windows 10
  • Python: 3.10.11
  • PyQt: 5.15.9

Is there a solution to this problem now?

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

3 participants