PDA

View Full Version : Method/Function With QString Arg



seanmu13
6th July 2007, 15:02
I am trying to write a QT function that takes a QString as an arguement. For example

void program::sendString(QString text){
}

I am not so good with pointers and such, and was not sure how to implement this in the .h file or if I need to change this function too.

seanmu13
6th July 2007, 15:25
this function will be a private slot by the way

jpn
7th July 2007, 10:43
class program : public QObject
{
Q_OBJECT // macro required for classes declaring its own signals and/or slots

public:
...

private slots:
void sendString(QString text); // do you mean this?
};