Results 1 to 9 of 9

Thread: Two windows in the same main

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Two windows in the same main

    For testing asynchronous communication you don't need threads.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Sep 2010
    Posts
    12
    Qt products
    Platforms
    Unix/X11

    Default Re: Two windows in the same main

    thank you for the answer.

    so the way i'm handling it now (two window.show in the same main) is a right way?
    is there a better way?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Two windows in the same main

    It's ok but don't create two instances of QApplication. One is enough. Your current code would not even compile
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Sep 2010
    Posts
    12
    Qt products
    Platforms
    Unix/X11

    Default Re: Two windows in the same main

    Ah yeah sorry I have done some cut and paste for deleting comments and renaming the objects and there was a mistake.. : )

    So it is ok, I can test how many TCP package can be sent for a second and stuffs like this, good, thank you!

    One more question:
    what happens if I use moveToThread methods on a QWidget subclass?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Two windows in the same main

    Most likely - BOOM!
    Less likely, a warning and a no-op.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Sep 2010
    Posts
    12
    Qt products
    Platforms
    Unix/X11

    Default Re: Two windows in the same main


    sorry?

    boom could mean runtime crash but.. no-op?

    anyway thank you for the answer i have understand i don't have to do it.

  7. #7
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Two windows in the same main

    Yes, boom refers to crashing
    no-op is short for "no operation", a term using in computer science to say that an instruction will actually not do anything.
    Like an empty method

    Cheers,
    _

Similar Threads

  1. Dialog box executed from main windows does not work ...
    By marco.stanzani in forum Qt Programming
    Replies: 0
    Last Post: 17th October 2011, 21:33
  2. How to close two main windows at a time
    By soumya in forum Qt Programming
    Replies: 7
    Last Post: 4th February 2010, 16:12
  3. How to show two main windows?
    By Althor in forum Newbie
    Replies: 4
    Last Post: 13th October 2008, 08:30
  4. Replies: 11
    Last Post: 11th August 2008, 09:14
  5. How to close all windows that were created in main()?
    By Mister_Crac in forum Qt Programming
    Replies: 6
    Last Post: 13th November 2006, 10:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.