Помощь - Поиск - Пользователи - Календарь
Полная версия этой страницы: Одевание на кнопку цвета
Форум на CrossPlatform.RU > Библиотеки > Qt > Qt GUI
AD
как кнопку сделать определенного цвета?

Чтобы было понятно, вот рисунок.
Нажмите для просмотра прикрепленного файла Нажмите для просмотра прикрепленного файла
Как одеть цвет на кнопку?
ViGOur
Таблица стилей. ;)

Или ты хочешь по другому?
AD
Цитата(ViGOur @ 9.4.2008, 15:55) *
Таблица стилей. ;)

Или ты хочешь по другому?

Можно пример простейшего кода! Не понимаю, как таблицей стилей! Именно кода! Мне необходимо видеть, как это ручками делается?

Цитата
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

о, спасибо! Подойдет :)
ViGOur
Цитата
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
Litkevich Yuriy
AD, тот пример что я давал по поводу png-картинок, содержит панель синиго цвета, посмотри там один цвет впалитре надо поменять.
Для просмотра полной версии этой страницы, пожалуйста, пройдите по ссылке.
Форум IP.Board © 2001-2024 IPS, Inc.