Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Windows interact
Forum Updated to NodeBB v4.3 + New Features

Windows interact

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 205 Views
  • 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.
  • F Offline
    F Offline
    Fanou
    wrote on last edited by
    #1

    Hi everybody,
    I'm using Qt Designer to design all the windows of my application. Then, i translate them into .py files. Every tuto i saw give a good explanation about this. However, no tuto show clearly how can i do to make interact each windows.
    To be clear :

    • first window made with Qt designer
    • in a new file i create a class "mainwindows" wich inherits from first window Ui
    • second window made with Qt designer
    • in a fourth file, i create a class "second windows" wich inherits from second window
      A Qpushbutton in the first window allows the application to hide the first window and launch the second window. What i can't understand is how closing the second window, i can reshow the first window (not a new instance but the hiden window).
      It's really obscure and though my research i never found any clear description.
      Could you help me please. It has been so long i'ma looking for the solution.
      Best regards.
      Fanou

    PS : i'm a new user of Python, and for the moment, i find VBA more flexible and easier to understand. I'm close to abandon Python due to his complexity, unless someone explain me how to do this so little and simply thing.

    JonBJ 1 Reply Last reply
    0
    • F Fanou

      Hi everybody,
      I'm using Qt Designer to design all the windows of my application. Then, i translate them into .py files. Every tuto i saw give a good explanation about this. However, no tuto show clearly how can i do to make interact each windows.
      To be clear :

      • first window made with Qt designer
      • in a new file i create a class "mainwindows" wich inherits from first window Ui
      • second window made with Qt designer
      • in a fourth file, i create a class "second windows" wich inherits from second window
        A Qpushbutton in the first window allows the application to hide the first window and launch the second window. What i can't understand is how closing the second window, i can reshow the first window (not a new instance but the hiden window).
        It's really obscure and though my research i never found any clear description.
        Could you help me please. It has been so long i'ma looking for the solution.
        Best regards.
        Fanou

      PS : i'm a new user of Python, and for the moment, i find VBA more flexible and easier to understand. I'm close to abandon Python due to his complexity, unless someone explain me how to do this so little and simply thing.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Fanou
      There are many ways to do this.

      If you really want second window to be able to re-show first window, first could pass its self as a parameter to second's constructor for second to later call .show() on.

      Many times when this question is asked you are really looking to use QStackedWidget to manage only showing one window at a time.

      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