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. How can we open 2 qwidget simulatenously
Forum Updated to NodeBB v4.3 + New Features

How can we open 2 qwidget simulatenously

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.5k 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.
  • H Offline
    H Offline
    Himanshupradhan
    wrote on last edited by
    #1

    i have taken a tcp/ip server client code from Qtexample[Fortune], and a analog clock example, firstly i run a tcp server and client program, now in tcp server program , in file server.cpp, in function send fortune, i am calling analog clock code[clock.show()], so it comes just for .1 second and disappear, i want to show this clock also, means that clock stay there.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      miroslav
      wrote on last edited by
      #2

      A common mistake is to create the widget variable on the stack, instead of using new. Showing multiple top-level widgets is not a problem in Qt.

      Mirko Boehm | mirko@kde.org | KDE e.V.
      FSFE Fellow
      Qt Certified Specialist

      1 Reply Last reply
      0
      • F Offline
        F Offline
        fluca1978
        wrote on last edited by
        #3

        Can you post the code that opens/shows the clock? I suspect that either you are allocating it on the stack, as miroslav suggested, or you are opening it thru a widget that is going to be deleted.

        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