47 QPixmap pixmap(u":/qt-project.org/designer/images/designer.png"_s);
48 pixmap.setDevicePixelRatio(devicePixelRatioF());
50 hitPoints.append(QPoint(56, 25));
51 hitPoints.append(QPoint(29, 55));
52 hitPoints.append(QPoint(56, 87));
53 hitPoints.append(QPoint(82, 55));
54 hitPoints.append(QPoint(58, 56));
81 if (me->button() == Qt::LeftButton) {
83 m_path.lineTo(me->pos());
85 for (
const QPoint &pt : std::as_const(hitPoints)) {
86 if (!m_path.contains(pt)) {
92 for (
const QPoint &pt : std::as_const(missPoints)) {
93 if (m_path.contains(pt)) {
99 if (gotIt && !secondStage) {
101 m_path = QPainterPath();
116 QStyleOptionButton opt;
119 opt.state |= QStyle::State_Raised;
121 opt.state |= QStyle::State_Sunken;
122 opt.state &= ~QStyle::State_HasFocus;
123 style()->drawControl(QStyle::CE_PushButtonBevel, &opt, &p,
this);
125 QLabel::paintEvent(pe);
128VersionDialog::VersionDialog(QWidget *parent)
135 setWindowFlag(Qt::MSWindowsFixedSizeDialogHint,
true);
136 QGridLayout *layout =
new QGridLayout(
this);
138 QLabel *lbl =
new QLabel(
this);
139 QString version = tr(
"<h3>%1</h3><br/><br/>Version %2");
140 version = version.arg(tr(
"Qt Widgets Designer")).arg(QLatin1StringView(QT_VERSION_STR));
141 version.append(tr(
"<br/>Qt Widgets Designer is a graphical user interface designer for Qt applications.<br/>"));
144 tr(
"%1<br/>Copyright (C) The Qt Company Ltd. and other contributors.").arg(version));
146 lbl->setWordWrap(
true);
147 lbl->setOpenExternalLinks(
true);
149 QDialogButtonBox *buttonBox =
new QDialogButtonBox(QDialogButtonBox::Close,
this);
150 connect(buttonBox , &QDialogButtonBox::rejected,
this, &QDialog::reject);
151 connect(label, &VersionLabel::triggered,
this, &QDialog::accept);
152 layout->addWidget(label, 0, 0, 1, 1);
153 layout->addWidget(lbl, 0, 1, 4, 4);
154 layout->addWidget(buttonBox, 4, 2, 1, 1);