Results 1 to 3 of 3

Thread: Customizing Qwtslider

  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 Customizing Qwtslider

    i can able to generate a slider using qwt.
    But i need to change the width and height of handle and slider in qwt.
    Is it possible ?? i have attached an snapshot of this...i need same as in snapshot.

    Untitled.png

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

    Default Re: Customizing Qwtslider

    QwtSclider::drawSlider draws all parts without the scale and the handle, QwtSlider::drawHandle draws the handle. Both of the are virtual and can be overloaded.
    ( note that the geometry of the slider is affected by the contents margins ).

    Uwe

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

    Navi (24th June 2015)

  4. #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: Customizing Qwtslider

    when i give this code

    QPixmap b ("C:/Users/Desktop/image.png");
    QRect rect(12,15,16,17);

    QPainter painter(&b);
    mySlider->drawSlider(b,rect);

    i got an error.

    cannot convert parameter 1 from 'QPixmap' to 'QPainter *

    whats wrong

Similar Threads

  1. Customizing Qwtslider
    By Navi in forum Qt Programming
    Replies: 1
    Last Post: 23rd June 2015, 16:34
  2. scale in QwtSlider and QwtPlot
    By mastupristi in forum Qwt
    Replies: 3
    Last Post: 20th October 2014, 08:37
  3. QwtSlider stepSize
    By snowbound in forum Qwt
    Replies: 5
    Last Post: 14th March 2014, 14:46
  4. QwtSlider resize
    By vratojr in forum Qwt
    Replies: 1
    Last Post: 13th July 2011, 13:28
  5. Align QwtSlider and QwtPlot
    By justoit in forum Qwt
    Replies: 4
    Last Post: 4th May 2011, 12:41

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.