New" to create a new (duplicate) window of current form" /> New" to create a new (duplicate) window of current form">

How to use "File->New" to create a new (duplicate) window of current form

Heads up! You've already completed this tutorial.

Cody_Jackson | 2020-12-29 21:00:43 UTC | #1

I've found the Qt documentation for QFileDialog and similar things, but all the references I've found discuss opening existing files or saving your current file. I haven't found anything that states how to actually create a new file, i.e. a new instance of your application.

I'm creating a character record sheet for a game. Since it's possible for one person to have multiple characters, especially if the game master wants to have many NPCs, having the ability to use File->New Character would be useful.

In summary, if the application is open with a character sheet, how would I call the code to create a new character sheet? I am using PyQt5 and the character sheet is created w/ QtDesigner.


Packaging Python Applications with PyInstaller by Martin Fitzpatrick — This step-by-step guide walks you through packaging your own Python applications from simple examples to complete installers and signed executables.

More info Get the book

Well done, you've finished this tutorial! Mark As Complete
[[ user.completed.length ]] completed [[ user.streak+1 ]] day streak

How to use "File->New" to create a new (duplicate) window of current form was written by Martin Fitzpatrick .

Martin Fitzpatrick has been developing Python/Qt apps for 8 years. Building desktop applications to make data-analysis tools more user-friendly, Python was the obvious choice. Starting with Tk, later moving to wxWidgets and finally adopting PyQt.