[ fromfile: widgets-questions.xml id: widgets-questions ]
List six things that QWidget
s have in common.
They are QObject
s, so they can have parents, children, properties, signals, and slots. They are QPaintDevices, so they have a height, width, depth, and can be painted on the screen.
What is a dialog? Where is an appropriate place to use it?
What is a QLayout? What is its purpose? What is an example of a concrete QLayout class?
A QLayout is a class whose sole purpose it is to arrange other QWidget
s or sub-layouts. It has no visual representation itself. There are Boxes, Grids and Stacks.
Can a widget be a child of a layout?
When a widget is added to a layout, its parent is changed, but to the parent of the layout, not the layout itself. So the answer is "no".
Can a layout be a child of a widget?
Yes if it is a top-level layout.
Can a layout be a child of another layout?
Yes, that is how to nest layouts.
What are the advantages of listing your images in a resources file?
The images can get compiled into the executable and no longer need to be installed separately.
What is the difference between a spacer and a stretch?
A spacer is a fixed amount of space that does not stretch, while a stretch starts with a certain amount of space and expands to gobble up available space. In the case of multiple stretches in the same layout, the ratio can be used to determine which stretch expands faster.
Generated: 2012-03-02 | © 2012 Alan Ezust and Paul Ezust. |