duave
4th October 2010, 06:28
Hey guys,
I'm new to QT and I need some help with signals and slots.
Basically, I'm writing a program that uses QTcpSocket and connects to a server. I can get the connection part, but I need the text on the QPushButton to change from "Connect" to "Disconnect" when they click it and back from "Disconnect" to "Connect" when they click it again (and on.. and on..).
I can't figure out how to get the signals and slots to change appropriately.
How can I go about setting this up in QT?
I'm new to QT and I need some help with signals and slots.
Basically, I'm writing a program that uses QTcpSocket and connects to a server. I can get the connection part, but I need the text on the QPushButton to change from "Connect" to "Disconnect" when they click it and back from "Disconnect" to "Connect" when they click it again (and on.. and on..).
I can't figure out how to get the signals and slots to change appropriately.
How can I go about setting this up in QT?