Hello.
I made VCL for for Python as shown on webinar "Introduction to Python GUI Development with Delphi for Python - Part 1: Delphi VCL for Python":
from delphivcl import *
class MainForm(Form):
def __init__(self,Owner):
self.Caption = "Delphi VCL Form"
self.SetBounds(10,20,500,400)
self.Position="poScreenCenter"
self.lblHello = Label(self)
self.lblHello.SetProps(Parent = self, Caption = "Hello Python")
self.lblHello.SetBounds(10,10,100,30)
self.OnClose = self.__on_form_close
def __on_form_close(self, sender, action):
action.Value = caFree
def main():
Application.Initialize()
Application.Title = "DelphiVCL Test"
f = MainForm(Application)
f.Show()
FreeConsole()
Application.Run()
f.Destroy()
main()
When I run this code it works fine. VCL form is shown correctly.
But when I created a single exe-file using pyinstaller (pyinstaller -F -w --onefile testdelphivcl.py) and ran created exe-file I got the error:
If I use tkinter, exe-file, created by pyinstaller works correctly.
Can you tell me the correct way to create single exe-file when I use delphivcl in python?
Thank you.