呈现网格会引起子部件创建并加入页面,如清单4所示。
Rendering the grid causes all its child widgets to be created and added to the page, as shown below in Listing 4.
在这个示例中使用的VBox部件是一种布局部件,它垂直地排列子部件。
The VBox widget used in this example is a type of layout widget that stacks its children vertically.
下一步,我们将在这个主窗口中创建标签和按钮对象,作为主窗口的子部件。
Next, we've created Label and Button objects as child widgets inside the MainWindow.
应用推荐