Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. QmlPlot::QmlPlot(QDeclarativeItem *parent):
  2. QGraphicsProxyWidget(parent)
  3. {
  4. customPlot = new QCustomPlot();
  5. setWidget(customPlot);
  6. setVisible(true);
  7. }
  8.  
  9.  
  10. void QmlPlot::setup()
  11. {
  12. // LOADS of stuff to make the Plot.
  13. update(boundingRect());
  14. }
  15.  
  16. import QtQuick 1.1
  17. import com.ingima.qmlplot 1.0
  18.  
  19. Rectangle {
  20. width: 360
  21. height: 360
  22.  
  23. QmlPlot {
  24. id: myplot
  25. anchors.fill: parent
  26. color: "red"
  27. }
  28.  
  29. MouseArea {
  30. anchors.fill: parent
  31. onClicked: {
  32. myplot.setup();
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement