diff --git a/Graphs/gGraphView.cpp b/Graphs/gGraphView.cpp
index 4cd1d5be..2248e377 100644
--- a/Graphs/gGraphView.cpp
+++ b/Graphs/gGraphView.cpp
@@ -814,22 +814,22 @@ void gToolTip::paint()     //actually paints it.
                 rect.setY(0);
                 rect.setHeight(h);
             }
-            if (!m_pixmap.isNull()) {
+            if (!m_image.isNull()) {
                 m_graphview->deleteTexture(m_textureID);
                 m_textureID=0;
-                m_pixmap=QPixmap();
+                m_image=QImage();
                 m_invalidate=true;
             }
 
         } else {
             rect.setCoords(0,0,rect.width()+m_spacer*2,rect.height()+m_spacer*2);
             painter.end();
-            if (!m_pixmap.isNull()) {
+            if (!m_image.isNull()) {
                 m_graphview->deleteTexture(m_textureID);
             }
-            m_pixmap=QPixmap(rect.width()+2,rect.height()+2);
-            m_pixmap.fill(Qt::transparent);
-            painter.begin(&m_pixmap);
+            m_image=QImage(rect.width()+2,rect.height()+2,QImage::Format_ARGB32_Premultiplied);
+            m_image.fill(Qt::transparent);
+            painter.begin(&m_image);
         }
 
         lines_drawn_this_frame+=4;
@@ -839,7 +839,6 @@ void gToolTip::paint()     //actually paints it.
         brush.setStyle(Qt::SolidPattern);
         painter.setBrush(brush);
 
-
         painter.drawRoundedRect(rect,5,5);
         painter.setBrush(Qt::black);
 
@@ -847,17 +846,18 @@ void gToolTip::paint()     //actually paints it.
 
         painter.end();
         if (usepixmap) {
-            m_textureID=m_graphview->bindTexture(m_pixmap,GL_TEXTURE_2D,GL_RGBA,QGLContext::InvertedYBindOption);
+            m_image=QGLWidget::convertToGLFormat(m_image);
+            m_textureID=m_graphview->bindTexture(m_image,GL_TEXTURE_2D,GL_RGBA,QGLContext::NoBindOption);
             m_invalidate=false;
         }
     }
     if (usepixmap) {
-        x-=m_spacer+m_pixmap.width()/2;
-        y-=m_pixmap.height()/2;
+        x-=m_spacer+m_image.width()/2;
+        y-=m_image.height()/2;
         if (y<0) y=0;
         if (x<0) x=0;
-        if ((x+m_pixmap.width()) > (m_graphview->width()-10)) x=m_graphview->width()-10 - m_pixmap.width();
-        if (usepixmap && !m_pixmap.isNull()) {
+        if ((x+m_image.width()) > (m_graphview->width()-10)) x=m_graphview->width()-10 - m_image.width();
+        if (usepixmap && !m_image.isNull()) {
             glEnable(GL_BLEND);
             glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
             glEnable(GL_TEXTURE_2D);
@@ -2273,10 +2273,10 @@ void gGraphView::DrawTextQue()
                 // unbind the texture
                 myPixmapCache * pc=pixmap_cache[key];
                 deleteTexture(pc->textureID);
-                QPixmap *pm=pc->pixmap;
-                pixmap_cache_size-=pm->width() * pm->height() * (pm->depth()/8);
+                QImage & pm=pc->image;
+                pixmap_cache_size-=pm.width() * pm.height() * (pm.depth()/8);
                 // free the pixmap
-                delete pc->pixmap;
+                //delete pc->pixmap;
 
                 // free the myPixmapCache object
                 delete pc;
@@ -2302,7 +2302,7 @@ void gGraphView::DrawTextQue()
             // Generate the pixmap cache "key"
             QString hstr=QString("%4:%5:%6%7").arg(q.text).arg(q.color.name()).arg(q.font->key()).arg(q.antialias);
 
-            QPixmap * pm=NULL;
+            QImage pm;
 
             //Random_note: test add to qmake for qt5 stuff DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x040900
 
@@ -2321,24 +2321,32 @@ void gGraphView::DrawTextQue()
                 QRect rect=fm.boundingRect(q.text);
                 w=rect.width();
                 h=rect.height();
-                pm=new QPixmap(w+4,h+4);
-                pm->fill(Qt::transparent);
+                pm=QImage(w+4,h+4,QImage::Format_ARGB32_Premultiplied);
 
-                QPainter painter(pm);
+                pm.fill(Qt::transparent);
+
+                QPainter painter(&pm);
 
                 // Hmmm.. Maybe I need to be able to turn this on/off?
-                painter.setRenderHint(QPainter::TextAntialiasing, q.antialias);
 
 
                 QBrush b(q.color);
                 painter.setBrush(b);
+                //QFont font=*q.font;
+                //if (!q.antialias) {
+                //    q.font->setStyleStrategy(QFont::NoAntialias);
+                //} else q.font->setStyleStrategy(QFont::PreferAntialias);
+                //painter.setFont(font);
+
                 painter.setFont(*q.font);
+
+                painter.setRenderHint(QPainter::TextAntialiasing, q.antialias);
                 painter.drawText(2,h,q.text);
                 painter.end();
 
-                pc->pixmap=pm;
-                pixmap_cache_size+=pm->width()*pm->height()*(pm->depth()/8);
-                pc->textureID=bindTexture(*pm,GL_TEXTURE_2D,GL_RGBA,QGLContext::InvertedYBindOption);
+                pc->image=QGLWidget::convertToGLFormat(pm);
+                pixmap_cache_size+=pm.width()*pm.height()*(pm.depth()/8);
+                pc->textureID=bindTexture(pc->image,GL_TEXTURE_2D,GL_RGBA,QGLContext::NoBindOption);
                 pixmap_cache[hstr]=pc;
 
             }
@@ -2351,16 +2359,16 @@ void gGraphView::DrawTextQue()
                 glEnable(GL_TEXTURE_2D);
                 if (q.angle!=0) {
                     glPushMatrix();
-                    glTranslatef(q.x-pc->pixmap->height()*2+4,q.y+pc->pixmap->width()/2+4, 0);
+                    glTranslatef(q.x-pc->image.height()*2+4,q.y+pc->image.width()/2+4, 0);
                     glRotatef(-q.angle,0,0,1);
-                    drawTexture(QPoint(0,pc->pixmap->height()/2),pc->textureID);
+                    drawTexture(QPoint(0,pc->image.height()/2),pc->textureID);
                     glPopMatrix();
                     //glTranslatef(marginLeft()+4,originY+height/2+x/2, 0);
                     //glRotatef(-90,0,0,1);
                     //m_graphview->drawTexture(QPoint(0,y/2),titleImageTex);
                 } else {
                     // TODO: setup for rotation if angle specified.
-                    drawTexture(QPoint(q.x,q.y-pc->pixmap->height()+4),pc->textureID);
+                    drawTexture(QPoint(q.x,q.y-pc->image.height()+4),pc->textureID);
                 }
                 glDisable(GL_TEXTURE_2D);
                 glDisable(GL_BLEND);
diff --git a/Graphs/gGraphView.h b/Graphs/gGraphView.h
index cf077b1d..86c43865 100644
--- a/Graphs/gGraphView.h
+++ b/Graphs/gGraphView.h
@@ -496,7 +496,7 @@ protected:
     QString m_text;
     bool m_visible;
     int m_spacer;
-    QPixmap m_pixmap;
+    QImage m_image;
     GLuint m_textureID;
     bool m_invalidate;
 protected slots:
@@ -804,7 +804,7 @@ protected slots:
 struct myPixmapCache
 {
     quint64 last_used;
-    QPixmap *pixmap;
+    QImage image;
     GLuint textureID;
 };
 
diff --git a/Graphs/gXAxis.cpp b/Graphs/gXAxis.cpp
index 58f10c6a..7c230e66 100644
--- a/Graphs/gXAxis.cpp
+++ b/Graphs/gXAxis.cpp
@@ -59,9 +59,9 @@ void gXAxis::paint(gGraph & w,int left,int top, int width, int height)
             // Unbind any previous texture
             if (m_textureID) w.graphView()->deleteTexture(m_textureID);
 
-            m_pixmap=QPixmap(width+22,height+4);
-            m_pixmap.fill(Qt::transparent);
-            painter.begin(&m_pixmap);
+            m_image=QImage(width+22,height+4,QImage::Format_ARGB32_Premultiplied);
+            m_image.fill(Qt::transparent);
+            painter.begin(&m_image);
             painter.setPen(Qt::black);
         }
         double px,py;
@@ -247,17 +247,18 @@ void gXAxis::paint(gGraph & w,int left,int top, int width, int height)
 
         if (usepixmap) {
             painter.end();
-            m_textureID=w.graphView()->bindTexture(m_pixmap,GL_TEXTURE_2D,GL_RGBA,QGLContext::InvertedYBindOption);
+            m_image=QGLWidget::convertToGLFormat(m_image);
+            m_textureID=w.graphView()->bindTexture(m_image,GL_TEXTURE_2D,GL_RGBA,QGLContext::NoBindOption);
 
         }
         w.invalidate_xAxisImage=false;
     }
 
-    if (usepixmap && !m_pixmap.isNull()) {
+    if (usepixmap && !m_image.isNull()) {
         glEnable(GL_BLEND);
         glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
         glEnable(GL_TEXTURE_2D);
-        w.graphView()->drawTexture(QPoint(left-20,(top+height)-m_pixmap.height()+4),m_textureID);
+        w.graphView()->drawTexture(QPoint(left-20,(top+height)-m_image.height()+4),m_textureID);
         glDisable(GL_TEXTURE_2D);
         glDisable(GL_BLEND);
     }
diff --git a/Graphs/gXAxis.h b/Graphs/gXAxis.h
index 6a76f362..d0e21abf 100644
--- a/Graphs/gXAxis.h
+++ b/Graphs/gXAxis.h
@@ -44,7 +44,7 @@ class gXAxis:public Layer
         qint64 tz_offset;
         float tz_hours;
 
-        QPixmap m_pixmap;
+        QImage m_image;
         GLuint m_textureID;
 };
 #endif // GXAXIS_H
diff --git a/Graphs/gYAxis.cpp b/Graphs/gYAxis.cpp
index a0c6372b..6f7d00e4 100644
--- a/Graphs/gYAxis.cpp
+++ b/Graphs/gYAxis.cpp
@@ -129,7 +129,7 @@ gYAxis::gYAxis(QColor col)
 {
     m_line_color=col;
     m_text_color=col;
-    yAxisImageTex=0;
+    m_textureID=0;
 
     m_yaxis_scale=1;
 }
@@ -145,9 +145,9 @@ void gYAxis::paint(gGraph & w,int left,int top, int width, int height)
     if (w.graphView()->usePixmapCache()) {
         if (w.invalidate_yAxisImage) {
 
-            if (!yAxisImage.isNull()) {
-                w.graphView()->deleteTexture(yAxisImageTex);
-                yAxisImage=QPixmap();
+            if (!m_image.isNull()) {
+                w.graphView()->deleteTexture(m_textureID);
+                m_image=QImage();
             }
 
 
@@ -170,10 +170,10 @@ void gYAxis::paint(gGraph & w,int left,int top, int width, int height)
             GetTextExtent(fd,x,y);
             yh=y;
 
-            yAxisImage=QPixmap(width,height+y+4);
+            m_image=QImage(width,height+y+4,QImage::Format_ARGB32_Premultiplied);
 
-            yAxisImage.fill(Qt::transparent);
-            QPainter paint(&yAxisImage);
+            m_image.fill(Qt::transparent);
+            QPainter paint(&m_image);
 
 
             double max_yticks=round(height / (y+14.0)); // plus spacing between lines
@@ -249,16 +249,16 @@ void gYAxis::paint(gGraph & w,int left,int top, int width, int height)
                 }
             }
             paint.end();
-            //yAxisImage=QGLWidget::convertToGLFormat(pixmap.toImage().mirrored(false,true));
-            yAxisImageTex=w.graphView()->bindTexture(yAxisImage,GL_TEXTURE_2D,GL_RGBA,QGLContext::InvertedYBindOption);
+            m_image=QGLWidget::convertToGLFormat(m_image);
+            m_textureID=w.graphView()->bindTexture(m_image,GL_TEXTURE_2D,GL_RGBA,QGLContext::NoBindOption);
             w.invalidate_yAxisImage=false;
         }
 
-        if (!yAxisImage.isNull()) {
+        if (!m_image.isNull()) {
             glEnable(GL_BLEND);
             glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
             glEnable(GL_TEXTURE_2D);
-            w.graphView()->drawTexture(QPoint(left,(top+height)-yAxisImage.height()+5),yAxisImageTex);
+            w.graphView()->drawTexture(QPoint(left,(top+height)-m_image.height()+5),m_textureID);
             glDisable(GL_TEXTURE_2D);
             glDisable(GL_BLEND);
         }
diff --git a/Graphs/gYAxis.h b/Graphs/gYAxis.h
index ba2b4197..0e482125 100644
--- a/Graphs/gYAxis.h
+++ b/Graphs/gYAxis.h
@@ -112,8 +112,8 @@ class gYAxis:public Layer
         gVertexBuffer * lines;
         virtual bool mouseMoveEvent(QMouseEvent * event);
 
-        QPixmap yAxisImage;
-        GLuint yAxisImageTex;
+        QImage m_image;
+        GLuint m_textureID;
 
 };