Results 1 to 4 of 4

Thread: Problem with rubberband using Qwt5.0.1

  1. #1
    Join Date
    Nov 2006
    Posts
    58
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Problem with rubberband using Qwt5.0.1

    Hi guys:
    I'm facing a problem for a couple of days.

    I'm using Qt3.3.5 and Qwt5.0.1 to do my job. What I want is almost the same as the example provided by the source code package of Qwt. The example is called "realtime_plot". In the "realtime_plot" example, there are rubberband functionality, scrollbars, zoom stack etc. These features are just what I need! So I want to add them into my own app by using Qwt library.

    Unfortunately there is a problem. When I rubberband the plot, I notice that the symbols(which are called "XCross" in the "realtime_plot" example) drawn on the QwtPlot(or on the QwtPlotCanvas) do not be scaled(zoomed) simultaneously. In another words, the symbols' size do not be zoomed in or zoomed out.

    In my app, however, I want to zoomin or zoomout their size simultaneously while rubberbanding.

    For example, I want to draw some circles with red color on the QwtPlot. And then rubberband the plot, of course, the X-axis and Y-axis will make some changes. And also these red circles will become bigger.
    What should I do to solve the problem?Subclass a custom QwtPlotItem? Make some changes into the Qwt source code?...........

    So does anybody could give me some advices?

    Thanks a lot.
    Best regards.

  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: Problem with rubberband using Qwt5.0.1

    Qwt doesn't scale the symbol size, so this is something you have to add to your code:

    F.e. connect a slot to QwtPlotZoomer::zoomed and adjust the symbol size (QwtPlotCurve::setSymbol).

    HTH,
    Uwe

  3. #3
    Join Date
    Nov 2006
    Posts
    58
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Problem with rubberband using Qwt5.0.1

    Hi Uwe, first of all, I can't wait to say,your Qwt is really great!

    And second:
    Quote Originally Posted by Uwe View Post
    Qwt doesn't scale the symbol size, so this is something you have to add to your code:

    F.e. connect a slot to QwtPlotZoomer::zoomed and adjust the symbol size (QwtPlotCurve::setSymbol).

    HTH,
    Uwe
    Could you provide me some pieces of code?
    Just for open my mind.

    Thank you very much.

  4. #4
    Join Date
    Nov 2006
    Posts
    58
    Thanks
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Problem with rubberband using Qwt5.0.1

    Could anybody give me some codes to illustrate the job?
    I'm a freshman for Qt, so I really need you help.

    Thanks a lot.

Similar Threads

  1. Replies: 16
    Last Post: 7th March 2006, 16:57

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.