Results 1 to 2 of 2

Thread: LayoutDirectoin of QwtScaleDraw

  1. #1
    Join Date
    Jun 2012
    Posts
    173
    Thanks
    48
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default LayoutDirectoin of QwtScaleDraw

    Hello Guys,

    I am drawing a qwtscale on qwtplot, but i need a way to change the layout direction to go from rightToLeft not from leftToRight

    so instead of going

    - - - -| - - - -| - - - |- - - -| - - - -| - - - >
    1 2 3 4 5

    i want to be drawn

    < - - - -|- - - - |- - - - |- - - - |- - - -| - - -
    5 4 3 2 1

    I tried to change the layoutDirection of the painter i use to draw the scale but it did not do any thing... i tried to use painter.scale but this will show the numbers flipped too.

    Thank you
    Jesse
    Last edited by jesse_mark; 1st November 2012 at 16:39.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,312
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: LayoutDirectoin of QwtScaleDraw

    When you assign the axis range explicitely:
    Qt Code:
    1. plot->setAxisScale( axis, 5, 1 );
    To copy to clipboard, switch view to plain text mode 
    or when you are using the autoscaler:
    Qt Code:
    1. plot->scaleEngine( axis )->setAttribute( QwtScaleEngine::Inverted );
    To copy to clipboard, switch view to plain text mode 
    HTH,
    Uwe

Similar Threads

  1. Refreshing a Custom QwtScaleDraw
    By grantbj74 in forum Qwt
    Replies: 6
    Last Post: 28th March 2012, 05:20
  2. Replies: 1
    Last Post: 13th October 2011, 16:52
  3. Replies: 2
    Last Post: 14th September 2011, 07:53
  4. QwtScaleDraw align label to xaxis
    By kja in forum Qwt
    Replies: 1
    Last Post: 21st November 2010, 19:55
  5. Replies: 1
    Last Post: 14th October 2010, 18:56

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.