Results 1 to 9 of 9

Thread: Generating Dial using Qwt by Qt

  1. #1
    Join Date
    Jun 2015
    Location
    India
    Posts
    28
    Thanks
    7
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Generating Dial using Qwt by Qt

    I am able to generate a dial with scale outside the dial using QWT.I need to display the scale inside the dial.How can i display the scale inside the dial using QWT.

    And also I need the dial as double layer.

    How can i display the dial as double layer.

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

    Default Re: Generating Dial using Qwt by Qt

    The scale is part of the QwtDial, i.e. it is inside the dial widget. What do you mean by "inside the dial"? Are you talking about QwtKnob? Do you have a picture of what you want?

    And also I need the dial as double layer.
    How can i display the dial as double layer.
    Absolutely no idea what this might mean.

  3. #3
    Join Date
    Jun 2015
    Location
    India
    Posts
    28
    Thanks
    7
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Generating Dial using Qwt by Qt

    i have attached an image.i need the dial as same in that image

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

    Default Re: Generating Dial using Qwt by Qt

    What image?

  5. #5
    Join Date
    Jun 2015
    Location
    India
    Posts
    28
    Thanks
    7
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Generating Dial using Qwt by Qt

    dial.png
    i have attached an image.i need the dial as same in that image

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

    Default Re: Generating Dial using Qwt by Qt

    So you want the scale to be drawn with the labels closer to the centre of the widget than the scale tick marks.

    QwtRoundScaleDraw will only draw the label outside the ticks. I guess that you will have to subclass this class and adjust your version to render differently (drawTick() and drawLabel() probably). The in your QwtDial subclass use that renderer.

  7. The following user says thank you to ChrisW67 for this useful post:

    Navi (15th June 2015)

  8. #7
    Join Date
    Jun 2015
    Location
    India
    Posts
    28
    Thanks
    7
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Android Maemo/MeeGo

    Default Re: Generating Dial using Qwt by Qt

    I am a beginner in qwt. so give me an example for drawtick and drawlabel

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

    Default Re: Generating Dial using Qwt by Qt

    I am sorry, but I do not have a couple of hours to scratch your itch for you.

  10. #9
    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: Generating Dial using Qwt by Qt

    I am a beginner in qwt. so give me an example for drawtick and drawlabel
    The source code for Qwt is freely available, so look at the QwtRoundScaleDraw code and see how it draws the ticks and labels. Use your knowledge of high school geometry to reverse the direction of the ticks and then draw the labels at the new ends of the ticks in the class you derive from QwtRoundScaleDraw.

Similar Threads

  1. Generating Dial using Qwt in Qt
    By Navi in forum Qwt
    Replies: 1
    Last Post: 11th June 2015, 06:41
  2. Dial Controller
    By jeff28 in forum Newbie
    Replies: 1
    Last Post: 22nd August 2012, 23:36
  3. Dial Gauge
    By jeff28 in forum Newbie
    Replies: 1
    Last Post: 22nd August 2012, 23:35
  4. Can I set image for qwt dial
    By validator in forum Qwt
    Replies: 3
    Last Post: 17th December 2010, 06:20
  5. How can I draw needle for dial in Qwt
    By validator in forum Qwt
    Replies: 6
    Last Post: 3rd February 2008, 20:27

Tags for this Thread

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.