diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-08-20 14:24:58 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-09-06 11:58:40 +0000 |
commit | 550d2a0a15c9403894448ab83863e71bbac2d349 (patch) | |
tree | 78a189e5d9566a067dc73bc7811803dacb2c13a0 /tests/auto/tools | |
parent | dc73a691bff1a2aabb2b035802f591b527eda12f (diff) |
uic: Fix pixmap functions for QIcon
Task-number: QTBUG-8563
Change-Id: I69b16ac2327fee6dd6f26845bdda60ad4dde56fa
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'tests/auto/tools')
-rw-r--r-- | tests/auto/tools/uic/baseline/pixmapfunction.ui | 47 | ||||
-rw-r--r-- | tests/auto/tools/uic/baseline/pixmapfunction.ui.h | 74 |
2 files changed, 121 insertions, 0 deletions
diff --git a/tests/auto/tools/uic/baseline/pixmapfunction.ui b/tests/auto/tools/uic/baseline/pixmapfunction.ui new file mode 100644 index 0000000000..8edafc7248 --- /dev/null +++ b/tests/auto/tools/uic/baseline/pixmapfunction.ui @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Form</class> + <widget class="QWidget" name="Form"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>149</width> + <height>112</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap>labelPixmap</pixmap> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="pushButton"> + <property name="text"> + <string>PushButton</string> + </property> + <property name="icon"> + <iconset> + <normaloff>buttonIconNormalOff</normaloff> + <normalon>buttonIconNormalOn</normalon> + <disabledoff>buttonIconDisabledOff</disabledoff> + <disabledon>buttonIconDisabledOn</disabledon> + </iconset> + </property> + </widget> + </item> + </layout> + </widget> + <pixmapfunction>pixmapFunction</pixmapfunction> + <resources/> + <connections/> +</ui> diff --git a/tests/auto/tools/uic/baseline/pixmapfunction.ui.h b/tests/auto/tools/uic/baseline/pixmapfunction.ui.h new file mode 100644 index 0000000000..1644380c15 --- /dev/null +++ b/tests/auto/tools/uic/baseline/pixmapfunction.ui.h @@ -0,0 +1,74 @@ +/******************************************************************************** +** Form generated from reading UI file 'pixmapfunction.ui' +** +** Created by: Qt User Interface Compiler version 5.12.0 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef PIXMAPFUNCTION_H +#define PIXMAPFUNCTION_H + +#include <QtCore/QVariant> +#include <QtGui/QIcon> +#include <QtWidgets/QApplication> +#include <QtWidgets/QLabel> +#include <QtWidgets/QPushButton> +#include <QtWidgets/QVBoxLayout> +#include <QtWidgets/QWidget> + +QT_BEGIN_NAMESPACE + +class Ui_Form +{ +public: + QVBoxLayout *verticalLayout; + QLabel *label; + QPushButton *pushButton; + + void setupUi(QWidget *Form) + { + if (Form->objectName().isEmpty()) + Form->setObjectName(QString::fromUtf8("Form")); + Form->resize(149, 112); + verticalLayout = new QVBoxLayout(Form); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + label = new QLabel(Form); + label->setObjectName(QString::fromUtf8("label")); + label->setPixmap(QPixmap(pixmapFunction("labelPixmap"))); + + verticalLayout->addWidget(label); + + pushButton = new QPushButton(Form); + pushButton->setObjectName(QString::fromUtf8("pushButton")); + QIcon icon; + icon.addPixmap(QPixmap(pixmapFunction("buttonIconNormalOff")), QIcon::Normal, QIcon::Off); + icon.addPixmap(QPixmap(pixmapFunction("buttonIconNormalOn")), QIcon::Normal, QIcon::On); + icon.addPixmap(QPixmap(pixmapFunction("buttonIconDisabledOff")), QIcon::Disabled, QIcon::Off); + icon.addPixmap(QPixmap(pixmapFunction("buttonIconDisabledOn")), QIcon::Disabled, QIcon::On); + pushButton->setIcon(icon); + + verticalLayout->addWidget(pushButton); + + + retranslateUi(Form); + + QMetaObject::connectSlotsByName(Form); + } // setupUi + + void retranslateUi(QWidget *Form) + { + Form->setWindowTitle(QApplication::translate("Form", "Form", nullptr)); + label->setText(QString()); + pushButton->setText(QApplication::translate("Form", "PushButton", nullptr)); + } // retranslateUi + +}; + +namespace Ui { + class Form: public Ui_Form {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // PIXMAPFUNCTION_H |