这是使用MinGw 4.9.2
进行编译时提供的错误Makefile.Release:25631: recipe for target 'release/_obj/kdganttgraphicsitem.o' failed
mingw32-make[2]: *** [release/_obj/kdganttgraphicsitem.o] Error 1
mingw32-make[2]: Leaving directory 'C:/Users/BZ017-user/Desktop/kdchart-2.5.1-source/src'
Makefile:34: recipe for target 'release' failed
mingw32-make[1]: *** [release] Error 2
mingw32-make[1]: Leaving directory 'C:/Users/BZ017-user/Desktop/kdchart-2.5.1-source/src'
makefile:41: recipe for target 'sub-src-make_first-ordered' failed
mingw32-make: *** [sub-src-make_first-ordered] Error 2
我正在使用Qt 5.5:
当我尝试构建此项目时,它显示了这个
error: call of overloaded 'mapToChart(const QPersistentModelIndex&)' is ambiguous
const Span s = scene()->grid()->mapToChart( idx );
构建期间:这是函数
void GraphicsItem::updateItem( const Span& rowGeometry, const QPersistentModelIndex& idx )
{
qDebug() << "GraphicsItem::updateItem("<<rowGeometry<<idx<<")";
Updater updater( &m_isupdating );
if ( !idx.isValid() || idx.data( ItemTypeRole )==TypeMulti ) {
setRect( QRectF() );
hide();
return;
}
const Span s = scene()->grid()->mapToChart( idx );
setPos( QPointF( s.start(), rowGeometry.start() ) );
setRect( QRectF( 0., 0., s.length(), rowGeometry.length() ) );
setIndex( idx );
const Span bs = scene()->itemDelegate()->itemBoundingSpan( getStyleOption(), index() );
//qDebug() << "boundingSpan for" << getStyleOption().text << rect() << "is" << bs;
setBoundingRect( QRectF( bs.start(), 0., bs.length(), rowGeometry.length() ) );
const int maxh = scene()->rowController()->maximumItemHeight();
if ( maxh < rowGeometry.length() ) {
QRectF r = rect();
const Qt::Alignment align = getStyleOption().displayAlignment;
if ( align & Qt::AlignTop ) {
// Do nothing
} else if ( align & Qt::AlignBottom ) {
r.setY( rowGeometry.length()-maxh );
} else {
// Center
r.setY( ( rowGeometry.length()-maxh ) / 2. );
}
r.setHeight( maxh );
setRect( r );
}
PS:我正在使用这个库使用qt .i尝试Qtxlsx将图表绘制到xlsx文件中,但它没有启用允许控制轴中的轴的功能。图表。