Send Data In Publisher Through QT Button

Hi friends,

I have seen some online guides on how to link between QT GUI and ros with ‘publisher’.

all the guides are using ros::init

int main(int argc, char **argv)
{
ros::init(argc, argv,“envoyeur”);
}

but I need to send some data to ros, when I am clicking a button.
and in the functions of the button i cant use argc, argv.

in the mainWindow.cpp:
void MainWindow::on_savePositionButton_clicked()
{
//When I’m clicking here, i need to send some data with publisher.
}

Someone can help me please ?

THANK YOU!

Please ask questions like this on answers.ros.org, as our support guidelines ask:

http://wiki.ros.org/Support