• 15315阅读
  • 2回复

QPainter::end: Painter not active, aborted 段错误 [复制链接]

上一主题 下一主题
离线xutaozero21
 

只看楼主 倒序阅读 楼主  发表于: 2010-09-09
— 本帖被 XChinux 执行加亮操作(2010-09-10) —
我在Ubuntu10.04上编译了qt4.7 rc1的源代码,顺带把libmeegotouch也编译过了,在运行一个examples时,窗口一闪而过,debug信息显示如下:
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setOpacity: Painter not active
QPainter::translate: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setBackground: Painter not active
QPainter::setBackgroundMode: Painter not active
QPainter::setBrushOrigin: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::drawPath: Painter not active
QPainter::end: Painter not active, aborted
段错误

会不会是我qt编译的有问题?还是环境变量没有配正确?
鄙视我好了~
离线xtfllbl

只看该作者 1楼 发表于: 2010-09-09
会不会是我qt编译的有问题?还是环境变量没有配正确?
不是。与环境变量没有关系。

你这是什么example?一般Painter not active错误都是代码错误,是4.7自带的例子还是什么?
上海欢迎您
离线yfx2003

只看该作者 2楼 发表于: 2012-09-29
原因如下:

    //QWidget * QMainWindow::centralWidget () const

    //Returns the central widget for the main window.
    //This function returns zero if the central widget has not been set.

因此无法获得其paintDevice
www.qtcn.org/gpq4/
ajaxref.okajax.com/
快速回复
限100 字节
 
上一个 下一个