walking2017
deepin
2017-11-28 02:16 你这这是gtk 的画法不是 qt 吧?
如果是在 clion 中加Qt 的库,需要写到它的 CMakeLists.txt 文件中
# Find the QtWidgets library
find_package(Qt5Core)
find_package(Qt5Widgets)
find_package(Qt5Sql)
find_package(Qt5Network)
.....
需要哪一个就加一个
同里也要最后加上
# Use the Widgets module from Qt 5.
target_link_libraries(<项目名称> Qt5::Widgets Qt5::Sql Qt5::Network )
如果是在 clion 中加Qt 的库,需要写到它的 CMakeLists.txt 文件中
# Find the QtWidgets library
find_package(Qt5Core)
find_package(Qt5Widgets)
find_package(Qt5Sql)
find_package(Qt5Network)
.....
需要哪一个就加一个
同里也要最后加上
# Use the Widgets module from Qt 5.
target_link_libraries(<项目名称> Qt5::Widgets Qt5::Sql Qt5::Network )
Reply Like 0 View the author


中文 

根据帖子(http://blog.csdn.net/chlk118/article/details/49884335)的介绍,使用Clion开发Qt项目,做了个测试,
程序跑起来了,
跑起来是这个样子:
按钮样式图片丢失。。。
有如下错误输出:
(qt_test1:18519): Gtk-WARNING **: 无法在模块路径中找到主题引擎:“adwaita”,
(qt_test1:18519): Gtk-WARNING **: 无法在模块路径中找到主题引擎:“adwaita”,
** (qt_test1:18519): WARNING **: Pixbuf theme: Cannot load pixmap file /usr/share/themes/deepin/gtk-2.0/assets/trough-progressbar.png: 识别文件“/usr/share/themes/deepin/gtk-2.0/assets/trough-progressbar.png”的图像文件格式失败
(qt_test1:18519): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(qt_test1:18519): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
** (qt_test1:18519): WARNING **: Invalid borders specified for theme pixmap:
/usr/share/themes/deepin/gtk-2.0/assets/trough-progressbar.png,
borders don't fit within the image
(qt_test1:18519): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(qt_test1:18519): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_pixels_with_length: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
......
......
......
(qt_test1:18519): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(qt_test1:18519): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_width: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
(qt_test1:18519): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
** (qt_test1:18519): WARNING **: Invalid borders specified for theme pixmap:
/usr/share/themes/deepin/gtk-2.0/assets/focus-line.png
borders don't fit within the image
......
......
......
提示中出现的png文件,本地对应目录下都有。
很长的这种错误信息,哪位大神可以帮忙看看,指点一下。万分感谢!!