Results 1 to 3 of 3

Thread: QwtDial and QwtKnob not sending position information

  1. #1
    Join Date
    Dec 2015
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Lightbulb QwtDial and QwtKnob not sending position information

    I am new to Qt and Qwt so I apologize in advance for the simplicity of my question. I am using Qt 5

    I created a QwtDial and QwtKnob and wanted to connect a signal to see the value change. I also created a QDial and did the same thing. the signals work correctly when I move the Qdial.

    d_knob = new QwtKnob;
    d_knob->setScale(0,20);
    ui->knobVerticalLayout->addWidget(d_knob);

    connect(d_knob, SIGNAL(d_knob->sliderMoved(double)), this, SLOT(testQwtDialSliderMoved(double)));

    when I run I get the message:
    QObject::connect: No such signal QwtKnob::d_knob->sliderMoved(double) in ..\qwt_test\mainwindow.cpp:51
    QObject::connect: (receiver name: 'MainWindow')

    I am sure I am missing something very simple. I am not getting a signal sent from QwtDial or QwtKnow but I am getting the signal from QDial.

    in my header file:
    public Q_SLOTS:
    void testQDialSliderMoved(int value);
    void testQwtDialSliderMoved(double value);


    any help would be appreciated.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QwtDial and QwtKnob not sending position information

    Wrong syntax for the connect() statement. Should be:

    Qt Code:
    1. connect(d_knob, SIGNAL(sliderMoved(double)), this, SLOT(testQwtDialSliderMoved(double)));
    To copy to clipboard, switch view to plain text mode 

    and be sure to define "testQwtDialSliderMoved()" as a slot in your MainWindow class.

    Please use CODE tags when posting code. Click "Go advanced" and then the "#" icon to insert the open/close tag pair. Paste your code between them.

  3. #3
    Join Date
    Dec 2015
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QwtDial and QwtKnob not sending position information

    all worked perfectly. operator error. Thank you very much. Love Qt awesome!!!

Similar Threads

  1. QwtKnob with only one possible value
    By achard.ju in forum Qwt
    Replies: 2
    Last Post: 26th November 2014, 08:24
  2. Sending information to server over an open HTTP connection
    By Pieter from Belgium in forum Qt Programming
    Replies: 5
    Last Post: 28th August 2013, 15:37
  3. QwtKnob - how to set the labels?
    By nancy014 in forum Qwt
    Replies: 1
    Last Post: 23rd January 2012, 19:10
  4. QwtKnob and QwtLog10ScaleEngine
    By F. H. Saad in forum Newbie
    Replies: 1
    Last Post: 13th July 2011, 11:21
  5. Replies: 2
    Last Post: 17th April 2010, 16:48

Tags for this Thread

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.