I want to develop some widgets for my project, I read Qt's widget source code & have some questions in programming:

1. The constructor of QAbstractButton:
Qt Code:
  1. explicit QAbstractButton (QWidget *parent = 0)
To copy to clipboard, switch view to plain text mode 
What is the purpose and the meaning to using the keyword explicit in constructor?

2. In the function QToolButtonPrivate:opupTimerDone(), some commands I don't understand:
Qt Code:
  1. QPointer<QMenu> actualMenu; //the type of actualMenu is'n a pointer
  2. ...
  3. if (...)
  4. actualMenu = menuAction->menu();
  5. else
  6. actualMenu = new QMenu(q); //but in this code, it used as a pointer
To copy to clipboard, switch view to plain text mode 

3. The relationship between QToolButton & QToolButtonPrivate (similar for other classes).

4. Using macro:
Qt Code:
  1. #define QTTR_NOOP(x) [B](x)[/B] // this macro has the result
  2. #define Q_DOC_PROPERTY(text) // but this macro doesn't have the result
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. #define Q_D(Class) Class##Private *const d=d_func()
  2. #define Q_Q(Class) Class *const q=q_func()
To copy to clipboard, switch view to plain text mode 
I don't understand the declare of these macros. Please explain it.


Thanks alot.