top of page

Multiple windows in PyQT5 - Codersarts

How to Open multiple window in mainwindow in PyQT using MDI-



To open multiple window in pyqt, you can MDI features, which enable multiple window within the mainwindow.


Here we attached output of 3 Coding parts which we will covers in this tutorial.


Type 1 :


When you click Subwindow, it display list of subwindow, after clicking on subwindow 1 new child window open within main window as per screenshot



Type 2 :


In this new child window open separate from mainwindow



Type 3 :


In this we load widget from current directory using textbox inside the main window and it published message when file exist if not exist in current directory then show error.




In Previous blog we covers how to install PyQT and how to work with client and server to publish message.


Here we attached a link, you can read these previous blog before start it -


Here we provide complete codes in different types format so you can understand it easily.


Here we add different types of code to open child window using MDI.


Type - 1






Type - 2


Open child window using main window button



Type - 3


Give file name which located in current directory using text box, it search if file exist and widget window open in main window and publish message in cmd and not exists then give error and not open widget window in main window





If you like Codersarts blog and looking for Assignment help,Project help, Programming tutors help and suggestion  you can send mail at contact@codersarts.com.

Please write your suggestion in comment section below if you find anything incorrect in this blog post 


bottom of page