Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
objectName が「of_esq」の QGroupBox があります。タイトルの色を変更するにはどうすればよいですか?
それは次のようなものですか:self.of_esq.setStyleSheet("of_esq.title {color: green}")?
self.of_esq.setStyleSheet("of_esq.title {color: green}")
ウィジェットにスタイルシートを直接設定している場合はof_esq、それを行うことができます (子がないことを前提としています)。QGroupBoxes
of_esq
QGroupBoxes
self.of_esq.setStyleSheet('QGroupBox {color: green;}')
of_esqの親にスタイルシートを設定し、css id セレクター ( #)を使用して名前でウィジェットを参照することもできます。
#
self.setStyleSheet('#of_esq {color: green;}')