Results 1 to 2 of 2

Thread: How to call one mainwindow to another mainwindow in Qt (or PyQt)

  1. #1
    Join Date
    Dec 2009
    Posts
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Unhappy How to call one mainwindow to another mainwindow in Qt (or PyQt)

    In my project i have created two mainwindow i want to call mainwindow2 from the mainwindow1 (which in running). in mainwindow1 i am already used the app.exec_() (PyQt) and to show maindow2 i am using the maindow2.show() in the click event of the button but does not show anything

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to call one mainwindow to another mainwindow in Qt (or PyQt)

    In my project i have created two mainwindow
    This points to a design problem.
    Maybe explain to us what you are trying to do (not how) and we might help you design you application better.

    in mainwindow1 i am already used the app.exec_()
    Again, this is wrong.
    Not sure how you can have app.exec() in your main window, when the window can't be shown before app.exec() is called...
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. How I can use CS_DROPSHADOW in QT MainWindow
    By gaddlord in forum Qt Programming
    Replies: 0
    Last Post: 14th November 2010, 21:24
  2. Replies: 1
    Last Post: 6th July 2010, 12:03
  3. How to call a dialog from a mainwindow
    By luiz4um in forum Qt Programming
    Replies: 26
    Last Post: 29th June 2010, 10:41
  4. MainWindow
    By amagdy.ibrahim in forum Newbie
    Replies: 6
    Last Post: 14th June 2008, 14:12
  5. MainWindow+Dialogs
    By fruzzo in forum Qt Programming
    Replies: 3
    Last Post: 20th May 2008, 08:52

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.