How to set PyQt6 window title font to bold

45 views Asked by At

I would like to set the title of my pyqt6 application to bold text. The font weight of the title doesn't change.

Below is my code.

from PyQt6.QtWidgets import QApplication, QMainWindow
from PyQt6.QtGui import QFont

app = QApplication([])

window = QMainWindow()
window.setWindowTitle("MyPyQt6 App")

font = QFont()
font.setBold(True)

window.setFont(font)
window.show()

app.exec()
0

There are 0 answers