User Tools

Site Tools


coding_style

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
coding_style [2016/03/11 12:36]
jmgr [Naming]
coding_style [2018/09/20 17:12] (current)
Line 79: Line 79:
 ==== Code separation ==== ==== Code separation ====
  
-Generally speaking, each class/​struct should have its declaration in one file (header) and its definition in another file (source file). If a class/​struct is very small then it can be contained in a header, for example if it only contains variables and no functions. Qt specific: note that QObject/​QWidget-based classes have to have their own header file in order to the MOC (Qt'​s ​meta compiler) to find them. +Generally speaking, each class/​struct should have its declaration in one file (header) and its definition in another file (source file). If a class/​struct is very small then it can be contained in a header, for example if it only contains variables and no functions. Qt specific: note that QObject/​QWidget-based classes have to have their own header file in order to the [[http://​doc.qt.io/​qt-5/​moc.html|moc]] ​(Qt'​s ​Meta-Object Compiler) to find them.
 ==== Naming ==== ==== Naming ====
  
coding_style.txt · Last modified: 2018/09/20 17:12 (external edit)