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.setRenderHint(QPainter::Antialiasing);
31 painter.setPen(QPen(QColor(0x66, 0x66, 0x66)));
32 painter.drawLine(0, 0, width() - 1, 0);
33 painter.drawLine(0, 0, 0, height() - 1);
34 painter.drawLine(0, height() - 1, width() - 1, height() - 1);
35 painter.drawLine(width() - 1, 0, width() - 1, height() - 1);
44 QHBoxLayout *layout =
new QHBoxLayout(
this);
45 layout->setContentsMargins(5, 2, 0, 0);
47 QPushButton *button =
new QPushButton(
this);
48 button->setIcon(QIcon(
":/tiny/btn_search_main_hover"));
49 button->setCursor(QCursor(Qt::PointingHandCursor));
50 button->setIconSize(QSize(25, 25));
52 button->setFocusPolicy(Qt::NoFocus);
56 layout->addWidget(button);
75 QWidget::paintEvent(event);
77 QPainter painter(
this);
78 painter.setRenderHint(QPainter::Antialiasing);
79 painter.fillRect(rect(), QColor(255, 255, 255, 180));
81 painter.setPen(QPen(QColor(0x66, 0x66, 0x66)));
82 painter.drawLine(0, 0, width() - 1, 0);
83 painter.drawLine(0, 0, 0, height() - 1);
84 painter.drawLine(0, height() - 1, width() - 1, height() - 1);
85 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)