Results 1 to 5 of 5

Thread: qwtwheel doesn't draw tick marks and is unresponsive

  1. #1
    Join Date
    Aug 2012
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X

    Default qwtwheel doesn't draw tick marks and is unresponsive

    Hi, I have Qt 4.8.2 and qwt 6.0.1 installed through macports on my mac which is running snow leopard(10.6.8).

    I have all the qwt widgets in Qt Designer, but when I try to add a wheel there are no tick marks no matter how I play with the variables.

    Then if I compile and run my project with the qwtwheel(I have no problems here and everything seems to link fine since I get no errors), it still doesn't draw right (no tick marks) and is completely unresponsive to mouse clicks/drags. No matter what signal/slot connections I set up, it does nothing. I don't think it even moves, but it is hard to tell with no tick marks. I tried using the qwtSlider and that worked just fine.

    Any ideas?

  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: qwtwheel doesn't draw tick marks and is unresponsive

    Compare your code with how the wheel is used in the radio and event_filter examples.

    Uwe

  3. #3
    Join Date
    Aug 2012
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: qwtwheel doesn't draw tick marks and is unresponsive

    Quote Originally Posted by Uwe View Post
    Compare your code with how the wheel is used in the radio and event_filter examples.

    Uwe
    Thank you for your reply. My code is generated by Qt Designer but even so I still checked it against the examples and nothing seems out of the ordinary. It includes qwt_wheel.h, initializes it, and adds it to the interface. It just seems that the wheel doesn't work like some of its source code is undefined...

    Qt Code:
    1. #ifndef UI_USERINTERFACE_H
    2. #define UI_USERINTERFACE_H
    3.  
    4. ...
    5.  
    6. #include "qwt_wheel.h"
    7.  
    8. QT_BEGIN_NAMESPACE
    9.  
    10. class Ui_UserInterface
    11. {
    12. public:
    13.  
    14. ...
    15.  
    16. QwtWheel *yWheel;
    17.  
    18. ...
    19.  
    20. void setupUi(QMainWindow *UserInterface)
    21. {
    22.  
    23. ...
    24.  
    25. yWheel = new QwtWheel(worldView);
    26. yWheel->setObjectName(QString::fromUtf8("yWheel"));
    27. horizontalLayout_3->addWidget(yWheel);
    28.  
    29. ...
    30. }
    31. etc...
    To copy to clipboard, switch view to plain text mode 

    It ends up looking like this and it won't move or respond to anything:
    Screen shot 2012-08-31 at 4.25.46 PM.png
    Last edited by mavxb3; 31st August 2012 at 23:27.

  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: qwtwheel doesn't draw tick marks and is unresponsive

    At least you have to set a range ( the default setting is an invalid one ): f.e yWheel->setRange( 0.0, 100.0 );

    Uwe

  5. The following user says thank you to Uwe for this useful post:

    mavxb3 (4th September 2012)

  6. #5
    Join Date
    Aug 2012
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: qwtwheel doesn't draw tick marks and is unresponsive

    Quote Originally Posted by Uwe View Post
    At least you have to set a range ( the default setting is an invalid one ): f.e yWheel->setRange( 0.0, 100.0 );

    Uwe
    Thank you, that fixed it. The range really shouldn't be initialized to something invalid, that's confusing. That's probably why it also doesn't look right in Qt Designer...

Similar Threads

  1. Replies: 2
    Last Post: 29th September 2011, 14:10
  2. qslider fixed to tick marks
    By holst in forum Qt Programming
    Replies: 4
    Last Post: 24th July 2009, 13:18
  3. QSlider with tick marks numbers
    By mastupristi in forum Qt Programming
    Replies: 3
    Last Post: 6th July 2009, 09:32
  4. QSlider with a custom set of labels for the tick marks?
    By whitefurrows in forum Qt Programming
    Replies: 3
    Last Post: 5th August 2007, 17:05
  5. MyQListBoxItem doesn't draw
    By codebehind in forum Newbie
    Replies: 3
    Last Post: 4th July 2007, 16:25

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.