aclock.cpp:83: no matching function for call to `QPainter::setWindow(int, int,

上一篇 / 下一篇  2009-01-07 20:07:34 / 个人分类:Linux(含QT)

我编译aclock时,出现问题如下:[root@localhost aclock]# make
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/friendly-arm/x86-qtopia/qt/include -o aclock.o aclock.cpp
aclock.cpp: In member function `void AnalogClock::drawClock(QPainter*)':
aclock.cpp:83: no matching function for call to `QPainter::setWindow(int, int,
  int, int)'
aclock.cpp:85: no matching function for call to `QPainter::viewport()'
aclock.cpp:88: no matching function for call to `QPainter::setViewport(int,
  int, int&, int&)'
aclock.cpp:94: no matching function for call to `QPainter::rotate(int)'
aclock.cpp:100: no matching function for call to `QPainter::rotate(int)'
aclock.cpp:107: no matching function for call to `QPainter::rotate(in

解决办法

参见 qpainter.h (qt-embedded-2.3.7\include)
setWindow函数的声明是用#ifndef QT_NO_TRANSFORMATIONS括起来的, 说明你的config里定义了这个宏, 所以这些函数都没编进你的qte

注释这个宏即可.


TAG:

 

评分:0

我来说两句

Open Toolbar