Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2575|回复: 2
打印 上一主题 下一主题

Qt 5.5.1下使用QWebView

[复制链接]

1272

主题

2067

帖子

7958

积分

认证用户组

Rank: 5Rank: 5

积分
7958
跳转到指定楼层
楼主
发表于 2018-4-17 11:54:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
http://doc.qt.io/archives/qt-5.5/qwebview.html

Header:
#include <QWebView>
qmake:
QT += webkitwidgets
Since:
Qt 4.4
Inherits:
  1.    QWebView *view = new QWebView(parent);
  2.     view->load(QUrl("http://qt.nokia.com/"));
  3.     view->show();
复制代码
回复

使用道具 举报

1272

主题

2067

帖子

7958

积分

认证用户组

Rank: 5Rank: 5

积分
7958
沙发
 楼主| 发表于 2018-4-17 14:46:35 | 只看该作者
本帖最后由 Qter 于 2018-4-17 17:56 编辑

linux报如下错误:
  1. /usr/bin/ld: warning: libsqlite3.so.0, needed by /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKitWidgets.so, not found (try using -rpath or -rpath-link)
  2. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_column_int64'
  3. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_bind_double'
  4. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_data_count'
  5. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_bind_text16'
  6. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_get_autocommit'
  7. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_bind_blob'
  8. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_busy_timeout'
  9. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_prepare16_v2'
  10. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_step'
  11. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_reset'
  12. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_column_bytes'
  13. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_expired'
  14. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_column_blob'
  15. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_last_insert_rowid'
  16. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_total_changes'
  17. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_extended_result_codes'
  18. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_column_int'
  19. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_interrupt'
  20. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_value_text16'
  21. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_bind_parameter_count'
  22. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_finalize'
  23. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_column_name16'
  24. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_bind_int64'
  25. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_value_type'
  26. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_column_bytes16'
  27. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_column_value'
  28. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_set_authorizer'
  29. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_value_double'
  30. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_open16'
  31. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_errcode'
  32. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_column_decltype16'
  33. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_close'
  34. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_column_text16'
  35. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_errmsg'
  36. /home/hechengjin/Qt5.5.1_x86/5.5/gcc/lib/libQt5WebKit.so: undefined reference to `sqlite3_bind_null'
  37. collect2: error: ld returned 1 exit status
复制代码
安装一下sqlite sqlite3
  1. sudo apt-get install sqlite sqlite3

  2. $ sqlite -version
  3. 2.8.17


  4. $ sqlite3 -version
  5. 3.16.2 2017-01-06 16:32:41 a65a62893ca8319e89e48b8a38cf8a59c69a8209


  6. $ whereis sqlite
  7. sqlite: /usr/bin/sqlite /usr/share/man/man1/sqlite.1.gz
  8. $ whereis sqlite3
  9. sqlite3: /usr/bin/sqlite3 /usr/share/man/man1/sqlite3.1.gz
复制代码
重新编译,问题依旧。

安装 libsqlite3-dev
sudo apt-get install libsqlite3-dev

问题依旧。

回复 支持 反对

使用道具 举报

1272

主题

2067

帖子

7958

积分

认证用户组

Rank: 5Rank: 5

积分
7958
板凳
 楼主| 发表于 2018-4-17 18:10:08 | 只看该作者
本帖最后由 Qter 于 2018-4-17 18:17 编辑

本地查看安装情况
locate libsqlite3.so
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0
/usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
发现默认是安装的64位的,要安装下32位的


用下列命令查找32位包

aptitude search libsqlite3

安装

sudo apt-get install libsqlite3-dev:i386

编译成功。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|firemail ( 粤ICP备15085507号-1 )

GMT+8, 2024-11-23 09:03 , Processed in 0.059098 second(s), 18 queries .

Powered by Discuz! X3

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表