diff options
Diffstat (limited to 'openglscene.cpp')
-rw-r--r-- | openglscene.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openglscene.cpp b/openglscene.cpp index f1dc09d..fa4dcf9 100644 --- a/openglscene.cpp +++ b/openglscene.cpp @@ -81,10 +81,9 @@ OpenGLScene::OpenGLScene() pos += QPointF(0, 10 + rect.height()); } - QRadialGradient gradient(0.5, 0.5, 0.5, 0.5, 0.5); + QRadialGradient gradient(40, 40, 40, 40, 40); gradient.setColorAt(0.2, Qt::yellow); gradient.setColorAt(1, Qt::transparent); - gradient.setCoordinateMode(QGradient::ObjectBoundingMode); m_lightItem = new QGraphicsRectItem(0, 0, 80, 80); m_lightItem->setPen(Qt::NoPen); @@ -156,6 +155,9 @@ void OpenGLScene::loadModel() void OpenGLScene::loadModel(const QString &filePath) { + if (filePath.isEmpty()) + return; + m_modelButton->setEnabled(false); QApplication::setOverrideCursor(Qt::BusyCursor); #ifndef QT_NO_CONCURRENT |