Results 1 to 4 of 4

Thread: QwtAnalogClock without label

  1. #1
    Join Date
    Dec 2013
    Posts
    11
    Thanks
    8

    Default QwtAnalogClock without label

    Hey Uwe,

    right now I try to implement a QwtAnalogClock and i don't want to have the labels (numbers 12, 1, 2, 3, 4,...).

    Further I would like to change the colors of the hands.

    Thank you very much!

    Greetings
    QTim

  2. #2
    Join Date
    Dec 2013
    Posts
    11
    Thanks
    8

    Default Re: QwtAnalogClock without label

    nevermind, found it by myself

    Qt Code:
    1. mClock = new QwtAnalogClock(this);
    2. mClock->hand(QwtAnalogClock::HourHand)->setPalette(QPalette(QColor(213,223,229)));
    3. mClock->hand(QwtAnalogClock::MinuteHand)->setPalette(QPalette(QColor(213,223,229)));
    4. mClock->hand(QwtAnalogClock::SecondHand)->setPalette(QPalette(QColor(255,0,0)));
    5. mClock->scaleDraw()->enableComponent(QwtAbstractScaleDraw::Labels , false);
    To copy to clipboard, switch view to plain text mode 

    Greetz
    QTim

  3. #3
    Join Date
    Mar 2019
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QwtAnalogClock without label

    Hello Uwe,
    I would like to remove the labels from the Analog Clock .

    My Qt Code:
    ui->AnalogClock->scaleDraw()->enableComponent(QwtAbstractScaleDraw::Labels,fals e);

    Gives this error :
    error: invalid use of incomplete type 'class QwtRoundScaleDraw'
    ui->AnalogClock->scaleDraw()->enableComponent(QwtAbstractScaleDraw::Labels,fals e);

    In Qwtdial.h

    QwtRoundScaleDraw *scaleDraw();
    const QwtRoundScaleDraw *scaleDraw() const;

    Could you please help.

    Thanks
    Sheethal


    ^~

  4. #4
    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: QwtAnalogClock without label

    #include <qwt_round_scale_draw.h>

    Uwe

Similar Threads

  1. Pixmap do not getting set in label
    By Niamita in forum Qt Programming
    Replies: 6
    Last Post: 20th January 2012, 14:23
  2. label setText value is 0
    By babygal in forum Qt Programming
    Replies: 3
    Last Post: 15th July 2010, 08:58
  3. QWT 5.2.0. Label on knob.
    By dima154 in forum Newbie
    Replies: 1
    Last Post: 11th October 2009, 10:40
  4. label as a QGraphicsItem
    By magland in forum Qt Programming
    Replies: 1
    Last Post: 29th December 2007, 18:24
  5. label
    By mickey in forum Qt Programming
    Replies: 10
    Last Post: 8th June 2006, 19:58

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.