Results 1 to 7 of 7

Thread: Having xBottom label problem in my trend, don't understand setMinBorderDist usage

  1. #1
    Join Date
    Apr 2010
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Question Having xBottom label problem in my trend, don't understand setMinBorderDist usage

    Hi everyone!

    As suggested in cpuplot example, i've used setMinBorderDist trying to avoid the "jumping canvas" effect in my trend. CpuPlot example have vertical labels for the bottom axis. My trend display labels horizontally. So i used this variation of the cpuplot example code:

    QwtScaleWidget *scaleWidget = plot->axisWidget(QwtPlot::xBottom);
    const int fmw = QFontMetrics(scaleWidget->font()).width("00:00:00");
    scaleWidget->setMinBorderDist(0, fmw / 2);


    ok, jumpin' effect does not appear anymore but I get a problem on the right of xBottom axis (see attachment), labels & axis values go outside the plot area, also curves go outside.

    I really don't get the correct usage of setMinBorderDist, maybe this problem come from the patch for multiple yAxis...

    some help?
    Attached Images Attached Images

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

    Default Re: Having xBottom label problem in my trend, don't understand setMinBorderDist usage

    Obviously you are not using an official Qwt release, right ?

    Uwe

  3. #3
    Join Date
    Apr 2010
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Having xBottom label problem in my trend, don't understand setMinBorderDist usage

    Quote Originally Posted by Uwe View Post
    Obviously you are not using an official Qwt release, right ?

    Uwe
    QWT 5.2.1 + multiple axis patch (5.0.x)

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

    Default Re: Having xBottom label problem in my trend, don't understand setMinBorderDist usage

    Quote Originally Posted by driven View Post
    QWT 5.2.1 + multiple axis patch (5.0.x)
    I'm afraid, that you are alone with layout problems in external patches.

    Uwe

  5. #5
    Join Date
    Apr 2010
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Having xBottom label problem in my trend, don't understand setMinBorderDist usage

    Quote Originally Posted by Uwe View Post
    I'm afraid, that you are alone with layout problems in external patches.

    Uwe
    Yeah Uwe, I know...

    But Am I missing official patch for multiple axis? Are there other ways to achieve the same result without external patches?

    Anyway Uwe, thanks for QWT!

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

    Default Re: Having xBottom label problem in my trend, don't understand setMinBorderDist usage

    Quote Originally Posted by driven View Post
    Are there other ways to achieve the same result without external patches?
    No, this feature is simply not supported by Qwt.

    As you have ported the patch to 5.2.1 please upload it ( preferable with the layout problem fixed ). I know that a couple users stay with Qwt 5.0 because of this patch.

    Uwe

  7. #7
    Join Date
    Apr 2010
    Posts
    9
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Having xBottom label problem in my trend, don't understand setMinBorderDist usage

    Quote Originally Posted by Uwe View Post
    As you have ported the patch to 5.2.1 please upload it ( preferable with the layout problem fixed ). I know that a couple users stay with Qwt 5.0 because of this patch.
    I've simply applied the patch 5.0.x to 5.2.1 and everything works fine for me (except for the layout problems). I know, I should not do such thing (is not the right way), but my project is still in a "experimental" status, so I do not care about problems regarding wrong patch version at this time. For the future I'll surely have the time to make things work perfectly, so be patient!

Similar Threads

  1. xBottom Scale Overide
    By baray98 in forum Qwt
    Replies: 7
    Last Post: 7th July 2011, 05:15
  2. label - pixmap - problem
    By qwrhiobasdbgghoasdf in forum Newbie
    Replies: 5
    Last Post: 16th September 2010, 00:29
  3. Replies: 3
    Last Post: 12th May 2010, 23:53
  4. Replies: 1
    Last Post: 21st April 2010, 02:54
  5. child label alignment problem
    By ht1 in forum Qt Programming
    Replies: 9
    Last Post: 21st November 2007, 20:50

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
  •  
Qt is a trademark of The Qt Company.