Adding default model
This commit is contained in:
parent
9bce01a717
commit
c2d07bc40c
4 changed files with 7 additions and 2 deletions
|
@ -4,5 +4,6 @@
|
|||
<file>mesh.vert</file>
|
||||
<file>quad.frag</file>
|
||||
<file>quad.vert</file>
|
||||
<file>sphere.stl</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
BIN
gl/sphere.stl
Normal file
BIN
gl/sphere.stl
Normal file
Binary file not shown.
|
@ -8,6 +8,7 @@ App::App(int argc, char *argv[]) :
|
|||
QApplication(argc, argv), window(new Window())
|
||||
{
|
||||
window->show();
|
||||
window->load_stl(":gl/sphere.stl");
|
||||
}
|
||||
|
||||
bool App::event(QEvent* e)
|
||||
|
|
|
@ -88,8 +88,11 @@ bool Window::load_stl(const QString& filename)
|
|||
connect(loader, &Loader::finished,
|
||||
[=](){ canvas->set_status(""); });
|
||||
|
||||
connect(loader, &Loader::loaded_file,
|
||||
this, &Window::setWindowTitle);
|
||||
if (filename[0] != ':')
|
||||
{
|
||||
connect(loader, &Loader::loaded_file,
|
||||
this, &Window::setWindowTitle);
|
||||
}
|
||||
|
||||
loader->start();
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue