-
大小: 2KB文件类型: .rar金币: 2下载: 0 次发布日期: 2021-06-01
- 语言: 其他
- 标签: QT TableWidget 分页效果 源代码
资源简介
QT TableWidget 分页效果 源代码 需要就拿走……

代码片段和文件信息
#include “tablewidget.h“
#include
TableWidget::TableWidget(QWidget *parent) :
QWidget(parent)
{
gridLayout = new QGridLayout(this);
gridLayout->setobjectName(QString::fromUtf8(“gridLayout“));
first_page = new QToolButton(this);
first_page->setobjectName(QString::fromUtf8(“first_page“));
gridLayout->addWidget(first_page 0 0 1 1);
up_page = new QToolButton(this);
up_page->setobjectName(QString::fromUtf8(“up_page“));
gridLayout->addWidget(up_page 0 1 1 1);
label = new QLabel(this);
label->setobjectName(QString::fromUtf8(“label“));
gridLayout->addWidget(label 0 2 1 1);
combox = new QComboBox(this);
combox->setobjectName(QString::fromUtf8(“combox“));
gridLayout->addWidget(combox 0 3 1 1);
all_page = new QLabel(this);
all_page->setobjectName(QString::fromUtf8(“all_page“));
gridLayout->addWidget(all_page 0 4 1 1);
next_page = new QToolButton(this);
next_page->setobjectName(QString::fromUtf8(“next_page“));
gridLayout->addWidget(next_page 0 5 1 1);
last_page = new QToolButton(this);
last_page->setobjectName(QString::fromUtf8(“last_page“));
gridLayout->addWidget(last_page 0 6 1 1);
tableWidget = new QTableWidget(this);
tableWidget->setobjectName(QString::fromUtf8(“tableWidget“));
tableWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
tableWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
gridLayout->addWidget(tableWidget 1 0 1 7);
first_page->setText(QApplication::translate(“Form2“ “|<“ 0 QApplication::UnicodeUTF8));
up_page->setText(QApplication::translate(“Form2“ “<“ 0 QApplication::UnicodeUTF8));
label->setText(QApplication::translate(“Form2“ “\345\275\223\345\211\215\351\241\265\357\274\232“ 0 QApplication::UnicodeUTF8));
next_page->setText(QApplication::translate(“Form2“ “>“ 0 QApplication::UnicodeUTF8));
last_page->setText(QApplication::translate(“Form2“ “>|“ 0 QApplication::UnicodeUTF8));
gridLayout->setColumnStretch(0 1);
gridLayout->setColumnStretch(1 1);
gridLayout->setColumnStretch(3 1);
gridLayout->setColumnStretch(5 1);
gridLayout->setColumnStretch(6 1);
record_page = 20;
total_page = 0;
curr_page = 0;
first_page->setEnabled(false);
up_page->setEnabled(false);
next_page->setEnabled(false);
last_page->setEnabled(false);
connect(first_pageSIGNAL(clicked())thisSLOT(firstpage()));
connect(up_pageSIGNAL(clicked())thisSLOT(uppage()));
connect(next_pageSIGNAL(clicked())thisSLOT(nextpage()));
connect(last_pageSIGNAL(clicked())thisSLOT(lastpage()));
connect(comboxSIGNAL(activated(int))thisSLOT(jump_page(int)));
}
void TableWidget::set_title(QStringList hor_name)
{
tableWidget->setColumn
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5391 2011-12-26 22:11 pagination\tablewidget.cpp
文件 1242 2011-12-26 16:36 pagination\tablewidget.h
目录 0 2011-12-30 14:22 pagination
----------- --------- ---------- ----- ----
6633 3
- 上一篇:广联达2011最新无驱破解写锁写狗数据
- 下一篇:软件测试网上订餐
相关资源
- 酒店管理系统基于Qt Creator5)
- vtk QT做的三维地质可视化系统2of2
- Qt局域网聊天软件
- Qt Creator opengl实现四元数鼠标控制轨迹
- QT局域网聊天系统(基于QT5.修改过)
- qt-电子点菜系统
- C 餐厅叫号系统(QT平)
- QT 实现文件下载
- qt图像处理
- QT,JPEG解码源代码(已完成)
- Qt 播放音频文件
- Qt 读取16进制的data文件
- MQTT+串口(usart)透传
- 易语言QQTEA算法源码
- VC工程转Qt工程文件的工具
- MQTT推送Demo
- 基于Linux、QT的视频监控系统的设计与
- Qt 百度地图 定位
- QT酷炫界面开发指南《QmlBook》
- Ubuntu下操作Excel,qt代码
- Qt图片浏览器 --基于Qt的Graphics View f
- qtnribbon2破解
- Qt软件开发 完整项目代码
- MQTT_3.1protocol_Specific中文版
- 在QT中使用RTP进行视频的采集和传输
- Mini6410 Qt4和Qtopia编程开发指南
- Qt实现Code39条形码
- qt_ffmpeg_mp4_export_and_import.zip
- QT5.5入门与项目实战
- Huffman Compress 霍夫曼编码 压缩 解压缩
评论
共有 条评论