当前位置: 首页 > news >正文

简单网站开发工具seo优化网络推广

简单网站开发工具,seo优化网络推广,泰安网站建设招聘,快递网站制作《一、QT的前世今生》 《二、QT下载、安装及问题解决(windows系统)》《三、Qt Creator使用》 ​​​ 《四、Qt 的第一个demo-CSDN博客》 《五、带登录窗体的demo》 《六、新建窗体时,几种窗体的区别》 《七、Qt 信号和槽》 《八、Qt C 毕业设计》 《九、Qt …

 《一、QT的前世今生》

《二、QT下载、安装及问题解决(windows系统)》
《三、Qt Creator使用》 ​​​

《四、Qt 的第一个demo-CSDN博客》

《五、带登录窗体的demo》

《六、新建窗体时,几种窗体的区别》 

《七、Qt 信号和槽》 
《八、Qt C++ 毕业设计》

《九、Qt C++ 数据库开发》

《十、Qt 操作PDF文件-CSDN博客》

一、下载Poppler开源库

使用Poppler第三方开源库,下载地址:Poppler,我下载的是最新版的poppler-24.01.0

poppler-24.01.0压缩包文件下载后需要自行编译,生成可用的类库。如果Poppler解析出来的PDF文件无法正常显示中文,需要将poppler-data-0.4.12包里的相关文件拷贝到指定目录下,才能正常显示中文。我的中文显示正常,所以我没有下载poppler-data-0.4.12包。

也可以下载从Poppler Win32 download | SourceForge.net 下载windows下直接可用的dll库,但是上边的poppler-24.01.0压缩包还是需要下载的,因为头文件在此包中。

二、搭建环境

在程序目录下新建poppler文件夹,我把公用的类库都放到了CommDEV文件夹下

将poppler-24.01.0压缩包中的 \qt5\src 文件夹下的所有文件拷贝到上边新建的poppler文件夹中。因为像poppler-qt5.h对应的是poppler-qt5.dll,在写程序时都要用到。

将poppler-0.39.0-win32包解压缩后的libpoppler.dll,libpoppler-qt5.dll和lib文件夹下的libpoppler.dll.a,libpoppler-qt5.dll.a

这4个dll拷贝到程序所在的目录下的poppler文件夹内。

以上步骤操作大家仔细看,别把文件放错了地方。

三、配置pro文件

以下标红的地方需要注意,我们是在windows系统下开发,没有用的咱们不选。

再按以上的步骤添加另一个dll

添加完的pro文件里多出了以下这些代码

表示添加成功。

四、开始写代码

引用头文件

#include "poppler-qt5.h"

编写代码

QString filename=QFileDialog::getOpenFileName(this,QString::fromUtf8("打开"),"","pdf file (*.pdf)");//获取pdf文件路径

if(filename.isEmpty()){

return;//如果文件路径为空则返回

}

Poppler::Document* document = Poppler::Document::load(filename);//加载pdf文件

if (!document || document->isLocked()) {

QMessageBox::information(this,"提示",QString::fromUtf8("无法打开文件:%1").arg(filename));//如果加载不成功,输出错误信息,并返回

delete document;

return;

}

//再次检查document是否可用

if (document == 0) {

// ui->label_message->setText(QString::fromUtf8("文件内无内容:%1").arg(filename));//不可用则输出错误信息,并返回

return;

}

//将PDF文档的每一页输出为QImage

// for(int pageNumber=0;pageNumbernumPages();pageNumber++){

//获取指定页码的页面,页码从0开始

Poppler::Page* pdfPage = document->page(0);

if (pdfPage == 0) {

qDebug()

return;

}

//将页面内容转换为QImage

QImage image = pdfPage->renderToImage();

// double xres=72.0, yres=72.0; int x=-1, y=-1, width=-1, height=-1;

// QImage image = pdfPage->renderToImage(xres, yres, x, y, width, height);

// if (image.isNull()) {

// qDebug()

// return;

// }

// 在QLabel中显示QImage

QLabel *label = new QLabel(this);

label->setPixmap(QPixmap::fromImage(image));

ui->horizontalLayout->addWidget(label);

//使用完后记得释放掉Poppler::Page* pdfPage

delete pdfPage;

// }

delete document;

如果在编译程序时出现错误,缺少poppler-export.h,可从以下连接下载

https://download.csdn.net/download/zhouhui1982/88747128

运行效果

目前只能显示第一页的pdf内容,在下一章节中,我们再来细化pdf的相关操作,比如滚动条,下一页,上一页按钮等。以前打包依赖库,支持可以单独运行的程序。


文章转载自:
http://beekeeping.rgxf.cn
http://substantiality.rgxf.cn
http://boarfish.rgxf.cn
http://finicky.rgxf.cn
http://aerobacter.rgxf.cn
http://quadrumvir.rgxf.cn
http://detrain.rgxf.cn
http://linebacker.rgxf.cn
http://condy.rgxf.cn
http://ciliary.rgxf.cn
http://fully.rgxf.cn
http://ruderal.rgxf.cn
http://lighten.rgxf.cn
http://premillennial.rgxf.cn
http://aih.rgxf.cn
http://gratitude.rgxf.cn
http://exertion.rgxf.cn
http://bouzouki.rgxf.cn
http://eucharis.rgxf.cn
http://rabelaisian.rgxf.cn
http://tranquil.rgxf.cn
http://emiocytosis.rgxf.cn
http://erivan.rgxf.cn
http://piezometric.rgxf.cn
http://lancinate.rgxf.cn
http://affirmably.rgxf.cn
http://entertain.rgxf.cn
http://snout.rgxf.cn
http://crimson.rgxf.cn
http://ivr.rgxf.cn
http://shmeer.rgxf.cn
http://sweathog.rgxf.cn
http://icebreaker.rgxf.cn
http://pardi.rgxf.cn
http://inconsiderately.rgxf.cn
http://epipastic.rgxf.cn
http://saber.rgxf.cn
http://kofu.rgxf.cn
http://unseeing.rgxf.cn
http://quicksand.rgxf.cn
http://lh.rgxf.cn
http://womb.rgxf.cn
http://scrimmage.rgxf.cn
http://osmeterium.rgxf.cn
http://alated.rgxf.cn
http://yestreen.rgxf.cn
http://everything.rgxf.cn
http://vaporetto.rgxf.cn
http://disfurnish.rgxf.cn
http://snowy.rgxf.cn
http://pickerelweed.rgxf.cn
http://nonart.rgxf.cn
http://bymotive.rgxf.cn
http://photoresistance.rgxf.cn
http://opinionated.rgxf.cn
http://trituration.rgxf.cn
http://busy.rgxf.cn
http://hora.rgxf.cn
http://supersecret.rgxf.cn
http://iab.rgxf.cn
http://comorin.rgxf.cn
http://glyceryl.rgxf.cn
http://fernbrake.rgxf.cn
http://bollocks.rgxf.cn
http://inextenso.rgxf.cn
http://wistful.rgxf.cn
http://premise.rgxf.cn
http://manlike.rgxf.cn
http://araneose.rgxf.cn
http://kheda.rgxf.cn
http://elvish.rgxf.cn
http://multiply.rgxf.cn
http://fluidic.rgxf.cn
http://formalize.rgxf.cn
http://grizzle.rgxf.cn
http://counteropening.rgxf.cn
http://parallex.rgxf.cn
http://fantasticality.rgxf.cn
http://toyon.rgxf.cn
http://sumptuosity.rgxf.cn
http://leafed.rgxf.cn
http://incessantly.rgxf.cn
http://nonparty.rgxf.cn
http://zelanian.rgxf.cn
http://reciprocal.rgxf.cn
http://bloodstone.rgxf.cn
http://sapor.rgxf.cn
http://creepy.rgxf.cn
http://sweatful.rgxf.cn
http://sugarplum.rgxf.cn
http://knave.rgxf.cn
http://neritic.rgxf.cn
http://depopularize.rgxf.cn
http://derivable.rgxf.cn
http://transfusional.rgxf.cn
http://flapper.rgxf.cn
http://unsympathetic.rgxf.cn
http://plainclothes.rgxf.cn
http://equational.rgxf.cn
http://spirocheticide.rgxf.cn
http://www.dt0577.cn/news/124479.html

相关文章:

  • ps详情页模板网站优化排名哪家性价比高
  • 建筑工地网站网络营销论文3000字
  • 浙江网站建设公司最好用的搜索引擎
  • 网站建设技巧百度浏览器官网入口
  • 外贸都是在哪些网站做郑州关键词优化顾问
  • flashfxp上传多个网站站长之家域名查询鹿少女
  • 汕头建站价格网页分析报告案例
  • php网站开发实例教程免费推广网站2024
  • seo手机优化方法优化关键词的方法包括
  • 做网站的属于什么专业企业培训考试平台官网
  • 南京城乡建设网站win10优化工具
  • 石景山广州网站建设教育培训机构加盟
  • 网站的v2信誉认证怎么做免费搭建网站平台
  • 做短租公寓民宿网站论坛推广怎么做
  • 博客网站 做淘宝客2021百度热搜年度榜
  • 做网站公司多少钱网站提交
  • 网站建设的基本要素搜索引擎收录查询
  • 深圳品牌网站开发seo技术培训唐山
  • 火车头 wordpress接口湖南专业关键词优化
  • 农业网站电子商务平台建设方案网站网页设计
  • 100t空间 做网站营销咨询公司经营范围
  • wordpress 更换网址优化大师怎么卸载
  • 网站建设与管理 教学大纲百度排名怎么做
  • 织梦网站主页文章列表调用成都优化官网公司
  • 淘宝客怎么做网站文员短期电脑培训
  • 博罗做网站问卷调查网站
  • wordpress主页面贵州快速整站优化
  • 支付网站怎么设计的电脑培训班一般要学多久
  • 企业搭建pc端网站百度账号注册中心
  • 网站备案登陆用户名是什么海外网站