wjakob/nori — pull request #4 by mssurajkaiga (2014-03-20 07:20:18+00:00)
Title: Fixed GUI issues while making

I'm running Ubuntu 13.10 with Qt5.
While running make, I encountered following issues:
``` In file included from src/main.cpp:25:0:
include/nori/gui.h:31:35: error: invalid use of incomplete type ‘struct QWidget’
/usr/include/qt5/QtCore/qmetatype.h:429:7: error: forward declaration of ‘struct QWidget’
include/nori/gui.h:45:2: error: ‘QSlider’ does not name a type
make: *** [build/main.o] Error 1```

which when corrected gave the following issues:
```src/gui.cpp: In constructor ‘NoriWindow::NoriWindow(const nori::ImageBlock*)’:
src/gui.cpp:149:2: error: ‘QVBoxLayout’ was not declared in this scope
src/gui.cpp:149:28: error: expected type-specifier before ‘QVBoxLayout’
src/gui.cpp:149:28: error: expected ‘;’ before ‘QVBoxLayout’
src/gui.cpp:150:8: error: invalid use of member (did you forget the ‘&’ ?)
src/gui.cpp:150:8: error: base operand of ‘->’ is not a pointer
src/gui.cpp:150:28: error: incomplete type ‘QLayout’ used in nested name specifier
src/gui.cpp:151:18: error: no matching function for call to ‘NoriWindow::setLayout()’
src/gui.cpp:151:18: note: candidate is:
/usr/include/qt5/QtWidgets/qwidget.h:524:10: note: void QWidget::setLayout(QLayout*)
/usr/include/qt5/QtWidgets/qwidget.h:524:10: note: no known conversion for argument 1 from ‘’ to ‘QLayout*’
src/gui.cpp:162:2: error: ‘QHBoxLayout’ was not declared in this scope
src/gui.cpp:162:15: error: ‘layout2’ was not declared in this scope
src/gui.cpp:162:29: error: expected type-specifier before ‘QHBoxLayout’
src/gui.cpp:162:29: error: expected ‘;’ before ‘QHBoxLayout’
src/gui.cpp:163:2: error: ‘QLabel’ was not declared in this scope
src/gui.cpp:163:10: error: ‘label’ was not declared in this scope
src/gui.cpp:163:22: error: expected type-specifier before ‘QLabel’
src/gui.cpp:163:22: error: expected ‘;’ before ‘QLabel’
src/gui.cpp:166:8: error: invalid use of member (did you forget the ‘&’ ?)
src/gui.cpp:166:8: error: base operand of ‘->’ is not a pointer
src/gui.cpp:167:8: error: invalid use of member (did you forget the ‘&’ ?)
src/gui.cpp:167:8: error: base operand of ‘->’ is not a pointer
make: *** [build/gui.o] Error 1```

The changes in the patch fixes this.