diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2008-06-26 10:46:24 +0200 |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2008-06-26 10:46:24 +0200 |
commit | b5425c0bffc46b3486fc45eab045cde435576991 (patch) | |
tree | 3035240699709fbf1663b38cca1dbc9322276999 | |
parent | 6aa53f342c6812bf487ad96565df90414d26b321 (diff) |
Simplifications.
-rw-r--r-- | main.cpp | 4 | ||||
-rw-r--r-- | openglscene.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
@@ -1,9 +1,7 @@ #include "openglscene.h" -#include <QApplication> +#include <QtGui> #include <QGLWidget> -#include <QGraphicsView> -#include <QResizeEvent> class GraphicsView : public QGraphicsView { 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 |