Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. TcpServer using Threading.. with GUI
Forum Updated to NodeBB v4.3 + New Features

TcpServer using Threading.. with GUI

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 5 Posters 1.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jagdish Jadav
    wrote on last edited by
    #1

    Hi
    I have done Example TCPserver with multithread without ui.
    i want create ui and than start TCPserver from button of ui

    A 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • J Jagdish Jadav

        Hi
        I have done Example TCPserver with multithread without ui.
        i want create ui and than start TCPserver from button of ui

        A Offline
        A Offline
        ambershark
        wrote on last edited by
        #3

        @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.

        My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

        1 Reply Last reply
        1
        • Hamed.MasafiH Offline
          Hamed.MasafiH Offline
          Hamed.Masafi
          wrote on last edited by
          #4

          I've already done that, take a look
          https://github.com/HamedMasafi/Noron

          Remote object sharing (OO RPC)
          http://forum.qt.io/topic/60680/remote-object-sharing-oo-rpc-solved

          Advanced, Powerful and easy to use ORM for Qt5
          https://forum.qt.io/topic/67417/advanced-powerful-and-easy-to-use-orm-for-qt5

          VRoninV 1 Reply Last reply
          0
          • Hamed.MasafiH Hamed.Masafi

            I've already done that, take a look
            https://github.com/HamedMasafi/Noron

            VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by
            #5

            @Hamed.Masafi Could you point us to a specific file?

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            Hamed.MasafiH 1 Reply Last reply
            0
            • VRoninV VRonin

              @Hamed.Masafi Could you point us to a specific file?

              Hamed.MasafiH Offline
              Hamed.MasafiH Offline
              Hamed.Masafi
              wrote on last edited by
              #6

              @VRonin
              https://github.com/HamedMasafi/Noron/blob/master/src/noronserver.cpp#L112

              Remote object sharing (OO RPC)
              http://forum.qt.io/topic/60680/remote-object-sharing-oo-rpc-solved

              Advanced, Powerful and easy to use ORM for Qt5
              https://forum.qt.io/topic/67417/advanced-powerful-and-easy-to-use-orm-for-qt5

              1 Reply Last reply
              0
              • VRoninV Offline
                VRoninV Offline
                VRonin
                wrote on last edited by
                #7
                • 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); in NoronServer::NoronServer(qint16 port, QObject *parent)

                "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                ~Napoleon Bonaparte

                On a crusade to banish setIndexWidget() from the holy land of Qt

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved