![]() |
Здравствуйте, гость ( Вход | Регистрация )
![]() |
AD |
![]()
Сообщение
#1
|
Профессионал ![]() ![]() ![]() ![]() ![]() Группа: Участник Сообщений: 2003 Регистрация: 4.2.2008 Из: S-Petersburg Пользователь №: 84 Спасибо сказали: 70 раз(а) Репутация: ![]() ![]() ![]() |
как кнопку сделать определенного цвета?
Чтобы было понятно, вот рисунок. [attachment=57:button1.JPG] [attachment=58:button2.JPG] Как одеть цвет на кнопку? |
|
|
![]() |
ViGOur |
![]()
Сообщение
#2
|
![]() Мастер ![]() ![]() ![]() ![]() ![]() ![]() Группа: Модератор Сообщений: 3296 Регистрация: 9.10.2007 Из: Москва Пользователь №: 4 Спасибо сказали: 231 раз(а) Репутация: ![]() ![]() ![]() |
Цитата One consequence of this is that setting a style rule on a widget automatically gives it precedence over other rules specified in the ancestor widgets' style sheets or the QApplication style sheet. Consider the following example. First, we set a style sheet on the QApplication: qApp->setStyleSheet("QPushButton { color: white }"); Then we set a style sheet on a QPushButton object: myPushButton->setStyleSheet("* { color: blue }"); The style sheet on the QPushButton forces the QPushButton (and any child widget) to have blue text, in spite of the more specific rule set provided by the application-wide style sheet. The result would have been the same if we had written myPushButton->setStyleSheet("color: blue"); Смотри: The Style Sheet Syntax |
|
|
![]() ![]() ![]() |
![]() |
|
Текстовая версия | Сейчас: 26.6.2025, 8:02 |