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. Client / Server apps
Forum Updated to NodeBB v4.3 + New Features

Client / Server apps

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 424 Views 1 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    I'm working on client / server applications, when the file transfer starts the server displays a progress dialog to show the transfer. The client also has a similar dialog, the problem is that it isn't showing.

    If I pause the server during a send the client dialog will appear, but it will not appear unless I pause the server.

    For testing both the client and server are running on the same computer, I'm guessing the client is to busy for the progress dialog to be displayed until I pause the server.

    Is there anything I can do to ensure that when I call show on the client that the dialog is actually displayed?

    Kind Regards,
    Sy

    jsulmJ 1 Reply Last reply
    0
    • SPlattenS SPlatten

      I'm working on client / server applications, when the file transfer starts the server displays a progress dialog to show the transfer. The client also has a similar dialog, the problem is that it isn't showing.

      If I pause the server during a send the client dialog will appear, but it will not appear unless I pause the server.

      For testing both the client and server are running on the same computer, I'm guessing the client is to busy for the progress dialog to be displayed until I pause the server.

      Is there anything I can do to ensure that when I call show on the client that the dialog is actually displayed?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @SPlatten said in Client / Server apps:

      Is there anything I can do to ensure that when I call show on the client that the dialog is actually displayed?

      Don't block event loop...
      Most probably you're blocking event loop. But without more information from your side others can only guess...

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3
      • C Offline
        C Offline
        ChrisW67
        wrote on last edited by
        #3

        Calling QWidget::show() does not immediately show the widget; the widget is shown when the Qt event loop is entered. In main() that is when you call QApplication::exec(). Similarly, updates to the widget visual are executed, when needed, by the event loop (e.g. in response to to a refresh triggered by calling QWidget::update()). If your code does things that block the program thread of execution returning to the event loop then visual updates (and asynchronous network activity etc) cease. This is very likely what you are doing, and a very common mistake.

        SPlattenS 1 Reply Last reply
        0
        • C ChrisW67

          Calling QWidget::show() does not immediately show the widget; the widget is shown when the Qt event loop is entered. In main() that is when you call QApplication::exec(). Similarly, updates to the widget visual are executed, when needed, by the event loop (e.g. in response to to a refresh triggered by calling QWidget::update()). If your code does things that block the program thread of execution returning to the event loop then visual updates (and asynchronous network activity etc) cease. This is very likely what you are doing, and a very common mistake.

          SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by
          #4

          @ChrisW67 , thank you, the issue here is I didn't write the host application just this layer, so I'm not entirely sure what is occurring.

          Kind Regards,
          Sy

          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