27 layout->setContentsMargins(0, 20, 0, 20);
28 layout->setSpacing(12);
41 QFont font(label->font());
42 font.setPixelSize(14);
61 layout->addStretch(1);
77 QVBoxLayout *funcLayout =
new QVBoxLayout(func);
79 QLabel *icon =
new QLabel(func);
80 icon->setPixmap(QPixmap(
":/lrc/lb_no_results"));
81 QLabel *text =
new QLabel(tr(
"There is empty"), func);
84 text->setAlignment(Qt::AlignCenter);
85 funcLayout->addWidget(icon, 0, Qt::AlignCenter);
86 funcLayout->addWidget(text, 0, Qt::AlignCenter);
87 func->setLayout(funcLayout);
88 layout->addWidget(func);
91 layout->addStretch(1);
115 for(
int i = 0; i < total; ++i)
162 m_pageItems[i]->setText(QString::number(page + i));
166 m_pageItems[0]->text().toInt() < MAX_PAGE_SIZE ? label->hide() : label->show();
177 int boundary = total - page + 1;
180 for(
int i = 0; i < boundary; ++i)
182 m_pageItems[i]->setText(QString::number(page + i));
225 label->setFixedWidth(label->width() + 5);
static const QString ColorStyle04
The class of the label widget that can click.
static const QString FontStyle01
Font.
MusicPageQueryWidget(QObject *parent=nullptr)
static constexpr int MAX_PAGE_SIZE
void page(int index, int total)
static const QString FontStyle04
QList< TTKClickedLabel * > m_pageItems
QWidget * createPageWidget(QWidget *parent, int total)
The class of the label widget click group mapper.