7 QHBoxLayout *layout =
new QHBoxLayout(
this);
8 layout->setContentsMargins(5, 2, 5, 0);
10 QLabel *icon =
new QLabel(
this);
11 icon->setFixedSize(16, 16);
15 layout->addWidget(icon);
27 QWidget::paintEvent(event);
29 QPainter painter(
this);
30 painter.setPen(QPen(QColor(0x66, 0x66, 0x66)));
31 painter.drawLine(0, 0, width() - 1, 0);
32 painter.drawLine(0, 0, 0, height() - 1);
33 painter.drawLine(0, height() - 1, width() - 1, height() - 1);
34 painter.drawLine(width() - 1, 0, width() - 1, height() - 1);
43 QHBoxLayout *layout =
new QHBoxLayout(
this);
44 layout->setContentsMargins(5, 2, 0, 0);
46 QPushButton *button =
new QPushButton(
this);
47 button->setIcon(QIcon(
":/tiny/btn_search_main_hover"));
48 button->setCursor(QCursor(Qt::PointingHandCursor));
49 button->setIconSize(QSize(25, 25));
51 button->setFocusPolicy(Qt::NoFocus);
55 layout->addWidget(button);
74 QWidget::paintEvent(event);
76 QPainter painter(
this);
77 painter.fillRect(rect(), QColor(255, 255, 255, 180));
79 painter.setPen(QPen(QColor(0x66, 0x66, 0x66)));
80 painter.drawLine(0, 0, width() - 1, 0);
81 painter.drawLine(0, 0, 0, height() - 1);
82 painter.drawLine(0, height() - 1, width() - 1, height() - 1);
83 painter.drawLine(width() - 1, 0, width() - 1, height() - 1);
The class of the search line edit widget.
virtual void paintEvent(QPaintEvent *event) overridefinal
void trigger(const QString &text)
MusicSearchEdit * m_searchEdit
MusicSearchEdit * m_searchEdit
MusicItemQueryEdit(QWidget *parent=nullptr)
static const QString BackgroundStyle01
Background.
virtual void paintEvent(QPaintEvent *event) overridefinal
MusicItemSearchEdit(QWidget *parent=nullptr)