Results 1 to 4 of 4

Thread: How to draw triangle points in QtChart?

  1. #1
    Join Date
    Feb 2014
    Posts
    28
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Question How to draw triangle points in QtChart?

    Hello everyone,

    I want to draw some points with triangle symbol, but the marker shape only support circle and rectangle shape.
    I can create a triangle shape as QImage and send it to the QBrush of QScatterSeries, but if I want to draw I border, I still can only draw a circular or rectangular border.
    Is there anyway I can draw a triangle point with triangle border?
    pic.png

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to draw triangle points in QtChart?

    Is there anyway I can draw a triangle point with triangle border?
    Add the border as part of your QImage.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. The following user says thank you to d_stranz for this useful post:

    momo (16th November 2017)

  4. #3
    Join Date
    Feb 2014
    Posts
    28
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to draw triangle points in QtChart?

    Thank you for your answering.
    Maybe I didn't make it clear, I want to draw some triangles with border, and others without border.

  5. #4
    Join Date
    Feb 2014
    Posts
    28
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to draw triangle points in QtChart?

    Quote Originally Posted by d_stranz View Post
    Add the border as part of your QImage.
    I rewrited the source code of QtChart and now it works! Thank you all the same!

Similar Threads

  1. Qt opengl use shader to draw triangle
    By zhangzhisheng in forum Qt Programming
    Replies: 1
    Last Post: 7th May 2015, 15:57
  2. How to draw arc between two points.
    By nikhil in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2011, 13:55
  3. How to draw fast rectangle/triangle/circle
    By nileshsince1980 in forum Qt Programming
    Replies: 1
    Last Post: 11th November 2008, 11:40
  4. How to draw some points and lines?
    By luffy27 in forum Qt Programming
    Replies: 1
    Last Post: 24th November 2006, 16:47

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.