Results 1 to 2 of 2

Thread: Editable labels on QwtScaleDraw

  1. #1
    Join Date
    Jan 2020
    Posts
    4
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Editable labels on QwtScaleDraw

    Hi,

    my user wants to change the boundaries of the axis by editing the labels itself. Idea is to overlay a QLineEdit or QSpinBox for this purpose (I found no way to edit the labels themselves, maybe I'm wrong here?). For the overlay I need the coordinates of the labels in the coordinate system of QwtScaleDraw. How can I compute them? Or is there another possibility to edit the labels directly on the axis (providing some QLineEdits elsewhere in the application didn't satisfy the user).

    Best regards,
    Carsten
    Last edited by CarstenS; 16th January 2020 at 17:31. Reason: forgot something

  2. #2
    Join Date
    Jan 2020
    Posts
    4
    Thanks
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Editable labels on QwtScaleDraw

    Got it now. The obvious function QwtScaleDraw::labelPosition() does the trick - my fault was to use it in ctor of the plot. If I wait until the plot is painted once, it works as expected.

Similar Threads

  1. One QwtScaleDraw to Rule-Them-All?
    By csteury in forum Qwt
    Replies: 4
    Last Post: 5th July 2016, 18:27
  2. QwtScaleDraw for yaxis
    By mikrocat in forum Qwt
    Replies: 6
    Last Post: 25th January 2016, 07:54
  3. Replies: 1
    Last Post: 20th January 2014, 00:29
  4. Problem with QwtScaleDraw
    By kanzaky in forum Qwt
    Replies: 3
    Last Post: 7th May 2013, 13:42
  5. Replies: 1
    Last Post: 14th October 2010, 19: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.