Giter Club home page Giter Club logo

qplot-example's Introduction

qplot-example

An example to show you how to use Qt's Graphics View framework to implement a plot-like application.

Screenshot

This example show you

  • How to use QGraphicsScene to draw background and foreground.
  • How to group items.
  • How to resize scene acoording to main window size.
  • How to fit view to the items in scene.
  • How to pan graphics view.
  • How to support multi-level zoom in operation.
  • How to draw text on foreground of scene and the text won't be scaled acoording to view's transformation.

NOTE To do multi-level zoom in. Use left button to drag the rect you want to zoom. After zoom in several times, click right button to zoom out one level. Use reset button reset the zoom level.

How to build it

  • Open src/qplot.pro by Qt Creator.
  • Press build button.
  • Run!

NOTE this program is built with Qt 5.4. However, it should be compatible with Qt4 and Qt5.

qplot-example's People

Contributors

garylee avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

zhenyouluo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.