GTK的CRITICAL **:IA__gtk_widget_style_get:断言`GTK_IS_WIDGET(部件)'失败 [英] Gtk-CRITICAL **: IA__gtk_widget_style_get: assertion `GTK_IS_WIDGET (widget)' failed

查看:1562
本文介绍了GTK的CRITICAL **:IA__gtk_widget_style_get:断言`GTK_IS_WIDGET(部件)'失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Qt应用程序的静态编译

After a static build of my qt application

./configure -static -debug-and-release  -confirm-license -nomake demos -nomake examples -nomake tools 

它工作正常,但我得到几个输出消息叫喊:

it works fine but I get several output messages yelling:

(MyApplication:32030): Gtk-CRITICAL **: IA__gtk_widget_style_get: assertion `GTK_IS_WIDGET (widget)' failed

是否真的有严重的问题,我应该使用不同的选项QT重建?

Is there really a critical problem, should I rebuild qt with different option?

任何帮助将AP preciated。

Any help will be appreciated.

推荐答案

这是有点晚了,但我希望它会拯救别人一些时间。

This is kind of late, but hopefully it will save someone else some time.

对于我来说,错误是由两件事引起的组合: QCleanlooksStyle QTableWidget的。在Ubuntu中,默认的样式或者是 QCleanlooksStyle QGtkStyle (从继承 QCleanlooksStyle )。当 QTableWidget的绘有这些样式任何一个,我看到了这个错误。我的解决办法是这样的:

For me, the error was being caused by the combination of two things: QCleanlooksStyle and QTableWidget. On ubuntu, the default style is either QCleanlooksStyle or QGtkStyle (which inherits from QCleanlooksStyle). When a QTableWidget is painted with either one of these styles, I saw that error. My solution was something like this:

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    a.setStyle(new QPlastiqueStyle());

    MainWindow w;
    w.show();

    return a.exec();
}

这篇关于GTK的CRITICAL **:IA__gtk_widget_style_get:断言`GTK_IS_WIDGET(部件)'失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆