Setting QWidget size
Rodrigo de Salvo Braz
rodrigobraz at gmail.com
Thu Apr 22 23:46:31 BST 2021
Hi Rich,
You can follow the same ideas for placing that layout with buttons in a
tab. You can just replace
self.setCentralWidget(container)
by
tabwidget = QTabWidget(self)
tabwidget.addTab(container, "My tab")
self.setCentralWidget(tabwidget)
It's true that eventually you will have a QMainWindow, but that should be
ok, because your application will eventually need to use a window, right?
And of course a QMainWindow is not required to have a status bar or menu,
etc.
Hope that helps.
Rodrigo
On Thu, Apr 22, 2021 at 2:48 PM Rich Shepard <rshepard at appl-ecosys.com>
wrote:
> On Thu, 22 Apr 2021, Rodrigo de Salvo Braz wrote:
>
> > PS: I thought you wanted just the container to show completely. If you
> > want the window to really have a fixed size, you can use
> > self.setFixedSize(800, 600)
>
> Rodrigo,
>
> That's one of the things I'm slowly learning. Yes, the application main
> window should be 800x600 and the content of each tab in the main windows'
> container (a QTabWidget) should fill it.
>
> During development I want to see each tab's content so I can tweak it for
> appearance and positioning.
>
> Thanks again,
>
> Rich
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210422/20ca5d09/attachment.htm>
More information about the PyQt
mailing list