<html>
<head>
<style type="text/css">
body,p,td,div,span{
        font-size:14px;font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; color: #212121;
};
body p{
        margin:0px;
}
</style>
</head>
<body><div>@michael h @Barry:</div><div>Thanks. But indeed you have to decide which way to go. In the meantime I found a workaround:</div><div>The directory of the ui - File must be include in the pyprogramfile.spec as pathex=nameofui.ui or as hiddenimport on the command line of pyinstaller.</div><div><br></div><div>Nethertheless it is confusing that there are different behaviors if a ui is loaded as file or imported. In my opinion there should be no difference. Maybe there are more troublemakers...</div><div><br></div><div>Regards</div><div>Hans<br></div><div><br></div><blockquote style="border:0;border-left: 2px solid #22437f; padding:0px; margin:0px; padding-left:5px; margin-left: 5px; "><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><br><br></div><div>Both did run, but if I use the import and set e.g. "self.ui.setWindowTitle('Do not read my title')" the app crashes with "AttributeError: 'Ui_MainWindow' object has no attribute 'setWindowTitle'" I don't understand the reason and in addition I have no idea how to solve this. Further ith hangs on <br></div><div> widgetList = self.ui.findChildren (QPushButton)<br>AttributeError: 'Ui_MainWindow' object has no attribute 'findChildren'<br></div><div>The idea behind was that I compile the ui before I run pyinstaller to avoid problems at runtime.<br></div></div><br></blockquote><div><br></div><div>You need to call self.setWindowTitle or self.findChildren. Those are methods on QMainWindow.</div><div><br></div><div><br></div></div></div>
</blockquote></body></html>