PDA

View Full Version : Doubts about QLayout, events and properties



rakuco
28th January 2006, 00:56
Hello, I've recently started reading the Qt3 documentation, and now I have some doubts.

1. What exactly are layouts, and, for instance, how is a QVBoxLayout different from a QVBox?
2. How are properties different from the usual setMember/getMember methods and when should I use them?
3. In what way are events and event filters different from normal methods and slots?

Thank you.

wysota
28th January 2006, 01:38
I hate to RTFM you, but RTFM :) And when you do, come back and ask your questions, because it is most probable, that an answer you get will point you to the docs anyway.

jacek
28th January 2006, 15:33
1. What exactly are layouts
Layouts manage the way that widgets will be placed.


and, for instance, how is a QVBoxLayout different from a QVBox?
QVBox is a widget with a QVBoxLayout layout.


2. How are properties different from the usual setMember/getMember methods and when should I use them?
Using Qt mechanisms you can check at runtime what properties a given object has. You can't do this with methods. You don't have to worry about properties, unless you want to create plugins.


3. In what way are events and event filters different from normal methods and slots?
Events are asynchronous and they are first stored in a queue, methods and slots are executed immediately (in Qt4 slots can behave like methods or like event handlers, depending on the connection type).