Kun-Tian / Pagination

a paging widget based on Qt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pagination

a paging widget based on Qt

Usage Demo

auto widget = new QWidget(this);
widget->setGeometry(0, 0, 560, 50);

auto hbox = new QHBoxLayout(widget);
hbox->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Preferred));

auto pagination = new Pagination(widget);
hbox->addWidget(pagination);

auto text = new QLabel(this);
text->setGeometry(120, 50, 40, 20);

connect(pagination, &Pagination::selectPage, [=](int value) {
	text->setText(QString::number(value));
});

pagination->setTotalSize(20);

image

About

a paging widget based on Qt

License:GNU General Public License v3.0


Languages

Language:C++ 100.0%