Results 1 to 13 of 13

Thread: Drawing a graphic?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2013
    Posts
    5
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Question Drawing a graphic?

    Hi everybody,

    I'm new at qt, so i have some questions.

    i have a double array and it occurs 10 or 15 numbers. How can I draw a number line graphic according to these numbers? Which can i use components or objects? Do you know any examples about it? i didn't find an example exactly in internet.

    Thanks

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    520
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 77 Times in 75 Posts

    Default Re: Drawing a graphic?

    Hi, I'm not sure what you mean, so two interpretations:
    - use QLCDWidget to show the numbers
    - use QGraphicsView and friends to draw what you like.

    Ginsengelf

  3. #3
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    3
    Thanked 65 Times in 59 Posts

    Default Re: Drawing a graphic?

    If you need technical graphics then there is qwt - but do some training in qt itself first

  4. #4
    Join Date
    Nov 2013
    Posts
    5
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Drawing a graphic?

    Thanks for replies.

    I want a number line like that:
    quadraticdemo.png

    Is there any source code example or full project? I just want a graphic with 10 or 15 numbers.

  5. #5
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    258
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    3
    Thanked 65 Times in 59 Posts

    Default Re: Drawing a graphic?

    I don't know whether there is a piece of source code available but your picture is exactly what qwt knows. Try google, search "qwt" and see.

  6. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Drawing a graphic?

    Or you could use QCustomPlot, which drew that graph in the first place. It is a GPL release: http://www.qcustomplot.com
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

Similar Threads

  1. QtQuick2.0 and Graphic Card
    By alizadeh91 in forum Qt Programming
    Replies: 3
    Last Post: 6th April 2013, 16:09
  2. Graphic by Qwt in a QGraphicsView
    By ChoCChoK in forum Qwt
    Replies: 3
    Last Post: 16th March 2011, 22:00
  3. Reshape graphic items
    By jsmith in forum Qt Programming
    Replies: 3
    Last Post: 31st July 2009, 07:46
  4. QLabel to scale a graphic
    By Scorp2us in forum Qt Programming
    Replies: 1
    Last Post: 17th March 2009, 05:55
  5. Graphic evaluation
    By jd in forum Qt Programming
    Replies: 3
    Last Post: 7th February 2008, 14:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.