def setValueDiagram(chart): if (chart.objectName() == "diagram1"): param = PyQtRPT.GraphParam() param.color = PyQtRPT.colorFromString("rgba(255,255,0,255)") param.valueReal = 150 param.caption = "Graph 1" chart.setData(param) param.color = PyQtRPT.colorFromString("rgba(0,0,255,255)") param.valueReal = 70 param.caption = "Graph 2" chart.setData(param) param.color = PyQtRPT.colorFromString("rgba(255,0,0,255)") param.valueReal = 220 param.caption = "Graph 3" chart.setData(param) param.color = PyQtRPT.colorFromString("rgba(0,128,128,255)") param.valueReal = 30 param.caption = "Graph 4" chart.setData(param, 150)
"No": 15, "Text": "After downloading, start the installer like any executable on the development platform. " "Select the components that you want to install and follow the instructions of the " "installation program to complete the installation. Use the Maintenance Tool under " " <install_dir> to add, update, or remove installed components." }, { "No": 16, "Text": "Qt features a wide range of different technologies. The following topics are key areas of " "functionality and can be used as a starting point for learning how to to get the most of Qt." }] a = QApplication(sys.argv) form = QDialog() report = PyQtRPT.QtRPT() report.loadReport("examples_report/example8.xml") #bac=QPixmap("examples/examples_report/qt_background_portrait.png") #report.setBackgroundImage(bac) report.setActivedSignal(False) #desactive signal setValue and setValueImage report.setTableMap([table], {}) report.recordCount = [len(table)] report.printExec() form.show() a.exec_()
fieldObject.backgroundColor = Qt.green if (fieldObject.name == "c4"): fieldObject.value = "Column 4 Row " + str(fieldObject.recNo() + 1) if (fieldObject.recNo() == 3): fieldObject.backgroundColor = Qt.yellow if (fieldObject.recNo() == 0): fieldObject.backgroundColor = Qt.magenta if (fieldObject.recNo() == 1): fieldObject.backgroundColor = Qt.cyan if (fieldObject.recNo() == 2): fieldObject.backgroundColor = Qt.green a = QApplication(sys.argv) form = QDialog() report = PyQtRPT.QtRPT() #//Make a page of report page = PyQtRPT.RptPageObject() page.pageNo = 0 #report.pageList.append(page) #//Append page to the report -> error report.addPage(page) #-> solution PySide ##//Make a ReportTitleBand band1 = PyQtRPT.RptBandObject() band1.name = "ReportTitle" band1.height = 80 band1.type = PyQtRPT.QtRptName.BandType.ReportTitle page.addBand(band1) #//Append band to the page # ##//Make a field