Unsolved TcpServer using Threading.. with GUI
-
Hi
I have done Example TCPserver with multithread without ui.
i want create ui and than start TCPserver from button of ui -
Hi
You need to dig into Creator and GUI making then
https://www.youtube.com/watch?v=3SIj6zL6mmA
http://doc.qt.io/qtcreator/creator-using-qt-designer.html
https://wiki.qt.io/Qt_for_Beginners -
@Jagdish-Jadav Just to get you pointed in the right direction before you basically learn GUI programming with Qt:
int main(int ac, char **av) { QApplication app(ac, av); QPushButton startButton("Start TCP Server"); // assume you have some sort of tcpserver widget that has a slot for starting the server called startServer connect(&startButton, SIGNAL(clicked()), tcpWidget, SLOT(startServer())); startButton.show(); return app.exec(); }
In this example there is no way to stop the server it will just be killed when the app exits (when someone clicks the close button on the widget window that contains the push button).
Also this is a very rudimentary GUI. It literally is just a button. It will be encased in normal window decorations from the window manager, but that is it.
-
I've already done that, take a look
https://github.com/HamedMasafi/Noron -
@Hamed.Masafi Could you point us to a specific file?
-
-
NoronServer::NoronServer(QObject *parent)
does not create the private part (i.e. d_ptr looks uninitialised...)- do not call
d->serverSocket->listen(QHostAddress::Any, port);
inNoronServer::NoronServer(qint16 port, QObject *parent)