Results 1 to 2 of 2

Thread: How to modify position of a QwtPlotPicker RubberBand from outside?

  1. #1
    Join Date
    Oct 2017
    Qt products
    Unix/X11 Windows

    Default How to modify position of a QwtPlotPicker RubberBand from outside?

    Hello friends.

    I have two qwtplots charts with a QwtPlotPicker with a VLineRubberBand. When I move the mouse, the rubberband follows the mouse. The charts have the same size and x values. The problem is that I want to modify both rubberbands from one of the charts. When I move the mouse from one chart, I should see the other chart rubberband move with the same position without interaction. I have tried without succes.

    Is this possible?

  2. #2
    Join Date
    Feb 2006
    Munich, Germany
    Thanked 811 Times in 760 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    MacOS X Unix/X11 Windows

    Default Re: How to modify position of a QwtPlotPicker RubberBand from outside?

    A QwtPlotPicker uses a state machine ( QwtPickerMachine ) that changes is state depending on receiving QwtPickerMachine::Command(s). Those commands are related to user inputs according to how you have set the event pattern parts, but of course you can also send commands manually. All state changes are indicated by signals and when you derive from QwtPlotPicker you also have access to the protected methods for setting the states.

    Then it should be easy to connect the 2 pickers, all you need to care of is to avoid ping pong effects.


Similar Threads

  1. Modify ScrollButton position in TabBar
    By ramsailesh in forum Qt Programming
    Replies: 1
    Last Post: 24th March 2014, 11:58
  2. [SOLVED] QwtPlotPicker rubberband
    By WoldemarShiPa in forum Qwt
    Replies: 0
    Last Post: 28th November 2013, 14:47
  3. Replies: 0
    Last Post: 13th May 2013, 13:14
  4. Replies: 6
    Last Post: 3rd August 2012, 07:48
  5. Rubberband zoom
    By sreedhar in forum Qt Programming
    Replies: 3
    Last Post: 12th September 2006, 12:38


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.