[Qt-interest] Newbie question about setting a simple signal and slot with creator based code.
Knapp
magick.crow at gmail.com
Tue Feb 17 22:45:06 CET 2009
Thanks for all your help. I am not bad with C but C++ is a bit new to
me. I thought I could make the 2 learning jumps together. It has gone
well but for getting stuck in a few ruts. I know I still have a lot to
learn but I think I can do it this way. It is like my 10 lang and 5
big lib.
> Andreas
>
> PS: I suggest to not cross-post such questions to the pyqt list and
> regarding "getting no answer", its not unusual to have to wait for a few
> days for an answer. People are answering here in their spare time often
> and that means they answer when they have time and feel like it.
I am used to Ubuntu list and if you don't get an answer in 24 hours it
is not happening 95% of the time, sorry.
/TryTwo/mainwindow.cpp:50: error: no matching function for call to
'MainWindow::connect(QSpinBox*&, const char [19],
Ui::MainWindowClass*&, const char [24])'
This is my latest mystery. I know that I can make the connect commands
in designer but I can't get it to work here, done by hand. I know what
I have does not work and I have tried lots of others. What am I
missing? It worked about like this is python. I even have the python
code in remarks. Perhaps it is missing something in the header?
File mainwindow.cpp
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindowClass)
{
ui->setupUi(this);
QObject::connect(ui->spinBox_DX_2, SIGNAL(valueChanged(int)), ui,
SLOT(label_DX_Cost_Set(int)));
//QObject::connect(spinBox_ST_2, SIGNAL(valueChanged(int)),
MainWindowClass, SLOT(STChangedSlot(int)));
//connect(okButton, SIGNAL(clicked()), this, SLOT(checkValues()));
/* python code
QtCore.QObject.connect(self.ui.spinBox_ST,
QtCore.SIGNAL("valueChanged(int)"), self.label_ST_Cost_Set)
QtCore.QObject.connect(self.ui.spinBox_IQ,
QtCore.SIGNAL("valueChanged(int)"), self.label_IQ_Cost_Set)
QtCore.QObject.connect(self.ui.spinBox_HT,
QtCore.SIGNAL("valueChanged(int)"), self.label_HT_Cost_Set)
QtCore.QObject.connect(self.ui.spinBox_HP,
QtCore.SIGNAL("valueChanged(int)"), self.adjust_HP)
*/
}
--
Douglas E Knapp
Why do we live?
More information about the Qt-interest-old
mailing list