Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QmlPlot::QmlPlot(QDeclarativeItem *parent):
- QGraphicsProxyWidget(parent)
- {
- customPlot = new QCustomPlot();
- setWidget(customPlot);
- setVisible(true);
- }
- void QmlPlot::setup()
- {
- // LOADS of stuff to make the Plot.
- update(boundingRect());
- }
- import QtQuick 1.1
- import com.ingima.qmlplot 1.0
- Rectangle {
- width: 360
- height: 360
- QmlPlot {
- id: myplot
- anchors.fill: parent
- color: "red"
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- myplot.setup();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement