在添加图例组件时,报Qt: Untested Windows version 10.0 detected,怎么解决了?
我下面这样写对吗?
LayoutElements elements = m_mapLayoutControl.getMapLayout().getElements();
GeoMap geoMap = (GeoMap) elements.getGeometry();
GeoLegend geoLegend = new GeoLegend(m_mapControl.getMap().getName(), m_workspace);
geoLegend.setHeight(175);
geoLegend.setWidth(750);
geoLegend.setCenter(new Point2D(121.3327, 27.4291));
GeoStyle legendStyle = new GeoStyle();
legendStyle.setFillForeColor(new Color(255, 235, 175));
legendStyle.setFillOpaqueRate(30);
legendStyle.setLineWidth(0.5);
legendStyle.setLineColor(new Color(65,65,65));
geoLegend.setBackGroundStyle(legendStyle);
geoLegend.setColumnCount(3);
//设置图例项和图例子项的说明文本的风格
TextStyle legendTextStyle = new TextStyle();
legendTextStyle.setBackColor(java.awt.Color.YELLOW);
legendTextStyle.setForeColor(java.awt.Color.BLUE);
legendTextStyle.setFontName("宋体");
legendTextStyle.setFontHeight(20.0);
legendTextStyle.setFontWidth(12.0);
legendTextStyle.setSizeFixed(false);
geoLegend.setItemTextStyle(legendTextStyle);
geoLegend.setSubItemTextStyle(legendTextStyle);
//设置图例标题风格
TextStyle titleTextStyle = new TextStyle();
titleTextStyle.setBackColor(java.awt.Color.YELLOW);
titleTextStyle.setForeColor(java.awt.Color.BLUE);
titleTextStyle.setFontName("宋体");
titleTextStyle.setFontHeight(40.0);
titleTextStyle.setFontWidth(25.0);
titleTextStyle.setItalic(true);
titleTextStyle.setBold(true);
titleTextStyle.setSizeFixed(false);
titleTextStyle.setWeight(500);
geoLegend.setTitle("图例");
geoLegend.setTitleStyle(titleTextStyle);
//将图例添加到布局图层,而非屏幕图层
geoLegend.load(false);
m_mapControl.getMap().getTrackingLayer().add(geoLegend,"yuyu ");