Поиск:

Ответ в темуСоздание новой темы Создание опроса
> [Qt] skinable приложения 
:(
    Опции темы
nerezus
Дата 27.9.2008, 21:35 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Вселенский отказник
****


Профиль
Группа: Участник
Сообщений: 3330
Регистрация: 15.6.2005

Репутация: 1
Всего: 43



Есть ли такая возможность в Qt?


--------------------
Сообщество художников Artsociety.ru
PM MAIL WWW   Вверх
Acer
Дата 28.9.2008, 02:13 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 652
Регистрация: 5.9.2007
Где: UA::DN

Репутация: 15
Всего: 8



Изменять скины в софтинке?
есть
PM MAIL   Вверх
anatox91
Дата 28.9.2008, 02:50 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


программист-самоучка
**


Профиль
Группа: Участник
Сообщений: 699
Регистрация: 12.1.2008
Где: ++Украина.Крым++

Репутация: нет
Всего: 13



в Qt есть много возможностей для изменения внешнего вида приложения - например, Qt Style Sheets - очень удобная вещь для этого


--------------------

The code is the design ©

Sony VAIO VGN-FW480J

user posted image
PM MAIL ICQ   Вверх
nerezus
Дата 28.9.2008, 10:32 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Вселенский отказник
****


Профиль
Группа: Участник
Сообщений: 3330
Регистрация: 15.6.2005

Репутация: 1
Всего: 43



anatox91, аа, понял, я хз почему забыл про них)
Не знаешь. где можно найти набор этих скинов-таблиц?
Ибо сам я далек от дизайнерства)


--------------------
Сообщество художников Artsociety.ru
PM MAIL WWW   Вверх
anatox91
Дата 28.9.2008, 12:38 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


программист-самоучка
**


Профиль
Группа: Участник
Сообщений: 699
Регистрация: 12.1.2008
Где: ++Украина.Крым++

Репутация: нет
Всего: 13



nerezus, нет, сам я еще не находил такого, но если найдешь, то выложи и сюда, т.к. тоже очень интересует этот вопрос


--------------------

The code is the design ©

Sony VAIO VGN-FW480J

user posted image
PM MAIL ICQ   Вверх
nerezus
Дата 28.9.2008, 13:06 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Вселенский отказник
****


Профиль
Группа: Участник
Сообщений: 3330
Регистрация: 15.6.2005

Репутация: 1
Всего: 43



Я нашел это: http://www.mimec.org/articles/qt/wmstyle
но тут стиль наполовину сделан, цветов нет.


И через SS:
Coffee:
Код

.QWidget {
   background-color: beige;
}

/* Nice Windows-XP-style password character. */
QLineEdit[echoMode="2"] {
    lineedit-password-character: 9679;
}

/* We provide a min-width and min-height for push buttons
   so that they look elegant regardless of the width of the text. */
QPushButton {
    background-color: palegoldenrod;
    border-width: 2px;
    border-color: darkkhaki;
    border-style: solid;
    border-radius: 5;
    padding: 3px;
    min-width: 9ex;
    min-height: 2.5ex;
}

QPushButton:hover {
   background-color: khaki;
}

/* Increase the padding, so the text is shifted when the button is
   pressed. */
QPushButton:pressed {
    padding-left: 5px;
    padding-top: 5px;
    background-color: #d0d67c;
}

QLabel, QAbstractButton {
    font: bold;
}

/* Mark mandatory fields with a brownish color. */
.mandatory {
    color: brown;
}

/* Bold text on status bar looks awful. */
QStatusBar QLabel {
   font: normal;
}

QStatusBar::item {
    border-width: 1;
    border-color: darkkhaki;
    border-style: solid;
    border-radius: 2;
}

QComboBox, QLineEdit, QSpinBox, QTextEdit, QListView {
    background-color: cornsilk;
    selection-color: #0a214c;
    selection-background-color: wheat;
}

/* We reserve 1 pixel space in padding. When we get the focus,
   we kill the padding and enlarge the border. This makes the items
   glow. */
QLineEdit, QFrame {
    border-width: 2px;
    padding: 1px;
    border-style: solid;
    border-color: darkkhaki;
    border-radius: 5px;
}

/* As mentioned above, eliminate the padding and increase the border. */
QLineEdit:focus, QFrame:focus {
    border-width: 3px;
    padding: 0px;
}

/* Nice to have the background color change when hovered. */
QRadioButton:hover, QCheckBox:hover {
    background-color: wheat;
}

/* Force the dialog's buttons to follow the Windows guidelines. */
QDialogButtonBox {
    button-layout: 0;
}

QToolTip {
    padding: 5px;
    border-radius: 3px;
    opacity: 200;
}



Pagefold:
Код

/* Customize any plain widget that is a child of a QMainWindow. */
QMainWindow > .QWidget {
    background-color: gainsboro;
    background-image: url(:/images/pagefold.png);
    background-position: top right;
    background-repeat: no-repeat
}

/* Provide a padding for the layout inside the frame. The frame
   exists only to provide a padding for the top-right image, so we
   explicitly disable the border. */
#mainFrame {
    padding-right: 30px;
    border-style: none;
    border-image: none; /* since we set a border-image below */
}

/* mainFrame won't have this border-image since we have
   explicitly set it to 'none' using a more specific selector. */
QFrame, QLineEdit, QComboBox[editable="true"], QSpinBox {
    border-image: url(:/images/frame.png) 4;
    border-width: 3;
}

/* Make text in message boxes selectable. */
QMessageBox {
    /* LinksAccessibleByMouse | TextSelectableByMouse */
    messagebox-text-interaction-flags: 5;
}
   
/* Set the selection colors for all widgets. */
QWidget {
    selection-color: black;
    selection-background-color: Silver;
    color: black;
}

/* Make the entire row selected in item views. */
QAbstractItemView {
    show-decoration-selected: 1;
}

/* Nice WindowsXP-style password character for password line edits. */
QLineEdit[echoMode="2"] {
    lineedit-password-character: 9679;
}

/* Customize tooltips. */
QToolTip {
    background-color: rgb(200,200,255);
    border-color: darkslategray;
    border-width: 1px;
    border-style: solid;
    padding: 3px;
    font: bold;
    border-radius: 3px;
    opacity: 200;
}

/* Customize radio buttons. */

QRadioButton {
    spacing: 5px;
}

QRadioButton::indicator {
    width: 13px;
    height: 13px;
}

QRadioButton::indicator::unchecked {
    image: url(:/images/radiobutton_unchecked.png);
}

QRadioButton::indicator:unchecked:hover {
    image: url(:/images/radiobutton_unchecked_hover.png);
}

QRadioButton::indicator:unchecked:pressed {
    image: url(:/images/radiobutton_unchecked_pressed.png);
}

QRadioButton::indicator::checked {
    image: url(:/images/radiobutton_checked.png);
}

QRadioButton::indicator:checked:hover {
    image: url(:/images/radiobutton_checked_hover.png);
}

QRadioButton::indicator:checked:pressed {
    image: url(:/images/radiobutton_checked_pressed.png);
}

/* Customize arrows. */

*::down-arrow, *::menu-indicator {
    image: url(:/images/down_arrow.png);
    width: 7px;
    height: 7px;
}

*::down-arrow:disabled, *::down-arrow:off {
   image: url(:/images/down_arrow_disabled.png);
}

*::up-arrow {
    image: url(:/images/up_arrow.png);
    width: 7px;
    height: 7px;
}

*::up-arrow:disabled, *::up-arrow:off {
   image: url(:/images/up_arrow_disabled.png);
}

/* Customize push buttons and comboboxes. Our read-only combobox
   is very similar to a push button, so they share the same border image. */

QPushButton {
    min-width: 4em;
}

QPushButton, QComboBox[editable="false"],
QComboBox[editable="true"]::drop-down {
    border-image: url(:/images/pushbutton.png) 5;
    border-width: 5;
}

QPushButton:hover, QComboBox[editable="false"]:hover,
QComboBox[editable="true"]::drop-down:hover, QMenuBar::item:hover {
    border-image: url(:/images/pushbutton_hover.png) 5;
    border-width: 5;
}

QPushButton:pressed, QComboBox[editable="false"]:on,
QComboBox[editable="true"]::drop-down:on, QMenuBar::item:on {
    border-image: url(:/images/pushbutton_pressed.png) 5;
    border-width: 5;
}

/* Customize read-only comboboxes. */

QComboBox[editable="false"] {
    padding-left: 3px;
    padding-right: 20px; /* space for the arrow */
}

QComboBox[editable="false"]::drop-down {
    subcontrol-origin: padding;
    subcontrol-position: top right;
    width: 15px;
    border-left-style: solid;
    border-left-color: darkgray;
    border-left-width: 1px;
}

QComboBox[editable="false"]::down-arrow {
    subcontrol-origin: content;
    subcontrol-position: center;
    position: relative;
    left: 1px; /* 1 pixel dropdown border */
}

/* The combobox arrow is on when the popup is open. */
QComboBox[editable="false"]::down-arrow:on {
    position: relative;
    top: 1px;
    left: 2px;
}

/* Customize editable comboboxes. */

QComboBox[editable="true"] {
    padding-right: 16px;
}

QComboBox[editable="true"]::drop-down {
    subcontrol-origin: border;
    subcontrol-position: top right;
    width: 13px;
    position: absolute;
    top: 2px;
    bottom: 2px;
    right: 2px;
}

QComboBox[editable="true"]::drop-down,
QComboBox[editable="true"]::drop-down:hover,
QComboBox[editable="true"]::drop-down:on {
    border-width: 0px;  
    border-left-width: 3px; /* we need only left and center part */
}

/* Shift the arrow when it's open. */
QComboBox[editable="true"]::down-arrow:on {
    position: relative;
    top: 1px;
    left: 1px;
}

/* Customize check boxes. */
QCheckBox {
    spacing: 5px;
}

QCheckBox::indicator {
    width: 13px;
    height: 13px;
}

QCheckBox::indicator:unchecked {
    image: url(:/images/checkbox_unchecked.png);
}

QCheckBox::indicator:unchecked:hover {
    image: url(:/images/checkbox_unchecked_hover.png);
}

QCheckBox::indicator:unchecked:pressed {
    image: url(:/images/checkbox_unchecked_pressed.png);
}

QCheckBox::indicator:checked {
    image: url(:/images/checkbox_checked.png);
}

QCheckBox::indicator:checked:hover {
    image: url(:/images/checkbox_checked_hover.png);
}

QCheckBox::indicator:checked:pressed {
    image: url(:/images/checkbox_checked_pressed.png);
}

/* Customize the size grip. */
QSizeGrip {
    image: url(:/images/sizegrip.png);
    width: 16px;
    height: 16px;
}

/* Customize the menu bar. */
QMenuBar {
    border-image: none;
    border-style: none;
    border-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: darkslategray;
    padding: 2px;
}

/* Customize spin boxes. */

QSpinBox { 
    padding-right: 15px;
}

QSpinBox::up-button {
    subcontrol-origin: border;
    subcontrol-position: top right;

    width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */
    border-image: url(:/images/spinup.png) 1;
    border-width: 1px;
}

QSpinBox::up-button:hover {
    border-image: url(:/images/spinup_hover.png) 1;
}

QSpinBox::up-button:pressed {
    border-image: url(:/images/spinup_pressed.png) 1;
}

QSpinBox::down-button {
    subcontrol-origin: border;
    subcontrol-position: bottom right;

    width: 16px;
    border-image: url(:/images/spindown.png) 1;
    border-width: 1px;
    border-top-width: 0;
}

QSpinBox::down-button:hover {
    border-image: url(:/images/spindown_hover.png) 1;
}

QSpinBox::down-button:pressed {
    border-image: url(:/images/spindown_pressed.png) 1;
}



Добавлено через 1 минуту и 54 секунды
Черт, эти 2 стандартные (


--------------------
Сообщество художников Artsociety.ru
PM MAIL WWW   Вверх
Любитель
Дата 30.9.2008, 20:11 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Программист-романтик
****


Профиль
Группа: Комодератор
Сообщений: 3645
Регистрация: 21.5.2005
Где: Воронеж

Репутация: 16
Всего: 92





--------------------
PM MAIL ICQ Skype   Вверх
nerezus
Дата 1.10.2008, 00:09 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Вселенский отказник
****


Профиль
Группа: Участник
Сообщений: 3330
Регистрация: 15.6.2005

Репутация: 1
Всего: 43



Любитель, спасибо, но...

Сначала в питоне пробовал: не понравилось. Думал, что бага, и типа не подгрузились некоторые картинки.
Потом поправил проект в блокноте(версию куте изменил), переконвертил в 2008, закомпилил и... то же самое.

Ужасно выглядит оно (


--------------------
Сообщество художников Artsociety.ru
PM MAIL WWW   Вверх
Любитель
Дата 1.10.2008, 11:50 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Программист-романтик
****


Профиль
Группа: Комодератор
Сообщений: 3645
Регистрация: 21.5.2005
Где: Воронеж

Репутация: 16
Всего: 92



Быть может - просто как-то на каком-то из кутешных форумов ссылка была, вот вспомнилось smile А так - я не проверял что там и как.


--------------------
PM MAIL ICQ Skype   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
Правила форума "С/С++: Кроссплатформенное программирование, QT/Gtk+/wxWidgets"
JackYF
Любитель
  • В заголовке темы в квадратных скобках обозначьте используемую вами библиотеку, например: [QT],[GTK],[wx].
  • Если вопрос актуален только для некоторой версии библиотеки, либо, если вы пользуетесь не самой последней версией, укажите это. Например: [QT4], [GTK2].
  • Все начинающие изучать Qt - не забудьте зайти сюда.
  • Проставьте несколько ключевых слов темы, чтобы её можно было легче найти.
  • В вопросе укажите полную версию версию библиотеки, а также все дополнительные используемые программные пакеты.
  • Не забывайте пользоваться кнопкой "Код".
  • Телепатов на форуме нет! Задавайте чёткий, конкретный и полный вопрос. Указывайте полностью ошибки компилятора и компоновщика.
  • Новое сообщение должно иметь прямое отношение к тематике этого раздела. Флуд, флейм, оффтопик запрещены.
  • Категорически запрещается обсуждение вареза, "кряков", взлома программ и т.д.

Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, JackYF, Любитель.

 
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | С/С++: Кроссплатформенное программирование, Qt/Gtk+/wxWidgets | Следующая тема »


 




[ Время генерации скрипта: 0.0529 ]   [ Использовано запросов: 22 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.