Results 1 to 4 of 4

Thread: QwtsSlider Scale Origin

  1. #1
    Join Date
    Dec 2007
    Posts
    119
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default QwtsSlider Scale Origin

    Hi,
    how can I get the exatly width (see the picture) between the QwtSlider widget bounding and the scale oprigin position (e.g. 0)?

    width.JPG

  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: QwtsSlider Scale Origin

    The QwtScaleDraw object of the slider knows the ticks and how to map a value to its widget position.

    Uwe

  3. #3
    Join Date
    Dec 2007
    Posts
    119
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: QwtsSlider Scale Origin

    ok...but when I try to use the method const QwtScaleDraw * scaleDraw () const, comiling I have an error, the compiler recognize it as private!

  4. #4
    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: QwtsSlider Scale Origin

    Obviously you want to access the non const method, that is private. Call the const method instead.

    Uwe

Similar Threads

  1. Replies: 1
    Last Post: 15th December 2010, 11:24
  2. Replies: 8
    Last Post: 15th November 2010, 10:07
  3. background-origin not working with svg?
    By Vadi in forum Qt Programming
    Replies: 0
    Last Post: 27th September 2010, 20:16
  4. QwtThermo: origin of the fill
    By Marco Trapanese in forum Qwt
    Replies: 0
    Last Post: 31st May 2010, 14:50
  5. Rotating a rectangle about its origin
    By babu198649 in forum Newbie
    Replies: 5
    Last Post: 25th October 2008, 12:24

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.