--- a/qthid.pro
+++ b/qthid.pro
@@ -4,7 +4,7 @@
 #
 #-------------------------------------------------
 
-QT       += core gui
+QT       += core gui widgets
 
 TEMPLATE = app
 
--- a/freqctrl.h
+++ b/freqctrl.h
@@ -22,7 +22,7 @@
 //void NewFrequency(qint64 freq);   //emitted when frequency has changed
 ///////////////////////////////////////////////////////////////////////
 
-#include <QtGui>
+#include <QtWidgets>
 #include <QFrame>
 #include <QImage>
 
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -21,7 +21,7 @@
  *
  ***************************************************************************/
 
-#include <QtGui>
+#include <QtWidgets>
 #include <QtDebug>
 #include <QMessageBox>
 #include "mainwindow.h"
--- a/main.cpp
+++ b/main.cpp
@@ -19,7 +19,7 @@
  *
  ***************************************************************************/
 
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
 #include "mainwindow.h"
 
 int main(int argc, char *argv[])
--- a/v2/mainwindow.cpp
+++ b/v2/mainwindow.cpp
@@ -18,7 +18,7 @@
  *
  ***************************************************************************/
 
-#include <QtGui>
+#include <QtWidgets>
 #include <QtDebug>
 #include "mainwindow.h"
 #include "ui_mainwindow.h"
--- a/v2/main.cpp
+++ b/v2/main.cpp
@@ -18,7 +18,7 @@
  *
  ***************************************************************************/
 
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
 #include "mainwindow.h"
 
 int main(int argc, char *argv[])
--- a/v2/qthid.pro
+++ b/v2/qthid.pro
@@ -4,7 +4,7 @@
 #
 #-------------------------------------------------
 
-QT       += core gui
+QT       += core gui widgets
 
 TEMPLATE = app
 
--- a/freqctrl.cpp
+++ b/freqctrl.cpp
@@ -61,7 +61,7 @@
     setAutoFillBackground(false);
     setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
     setFocusPolicy(Qt::StrongFocus);
-    setMouseTracking ( TRUE );
+    setMouseTracking ( true );
     m_BkColor = QColor(0x20,0x20,0x20,0xFF);//Qt::black;
     m_DigitColor = QColor(0xFF, 0xE6, 0xC8, 0xFF);
     m_HighlightColor = QColor(0x5A, 0x5A, 0x5A, 0xFF);
@@ -70,9 +70,9 @@
     Setup( 10, 1, 4000000000U, 1, UNITS_MHZ);
     m_Oldfreq = 0;
     m_LastLeadZeroPos = 0;
-    m_LRMouseFreqSel = FALSE;
+    m_LRMouseFreqSel = false;
     m_ActiveEditDigit = -1;
-    m_ResetLowerDigits = FALSE;
+    m_ResetLowerDigits = false;
     m_UnitsFont = QFont("Arial",12,QFont::Normal);
     m_DigitFont = QFont("Arial",12,QFont::Normal);
 }
@@ -101,9 +101,9 @@
 {
     if( ( point.x() < rect.right( ) ) && ( point.x() > rect.x() ) &&
         ( point.y() < rect.bottom() ) && ( point.y() > rect.y() ) )
-        return TRUE;
+        return true;
     else
-        return FALSE;
+        return false;
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -135,8 +135,8 @@
     {
         m_DigitInfo[i].weight = pwr;
         m_DigitInfo[i].incval = pwr;
-        m_DigitInfo[i].modified = TRUE;
-        m_DigitInfo[i].editmode = FALSE;
+        m_DigitInfo[i].modified = true;
+        m_DigitInfo[i].editmode = false;
         m_DigitInfo[i].val = 0;
         pwr *= 10;
     }
@@ -226,7 +226,7 @@
         if(m_DigitInfo[i].val != val)
         {
             m_DigitInfo[i].val = val;
-            m_DigitInfo[i].modified = TRUE;
+            m_DigitInfo[i].modified = true;
         }
         rem = rem - val*m_DigitInfo[i].weight;
         acc += val;
@@ -245,11 +245,11 @@
 //////////////////////////////////////////////////////////////////////////////
 void CFreqCtrl::SetDigitColor(QColor cr)
 {
-    m_UpdateAll = TRUE;
+    m_UpdateAll = true;
     m_DigitColor = cr;
     for(int i=m_DigStart; i<m_NumDigits; i++)
-        m_DigitInfo[i].modified = TRUE;
-    UpdateCtrl(TRUE);
+        m_DigitInfo[i].modified = true;
+    UpdateCtrl(true);
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -292,19 +292,19 @@
             m_UnitString = "nS ";
             break;
     }
-    m_UpdateAll = TRUE;
-    UpdateCtrl(TRUE);
+    m_UpdateAll = true;
+    UpdateCtrl(true);
 }
 //////////////////////////////////////////////////////////////////////////////
 //  Sets the Background color
 //////////////////////////////////////////////////////////////////////////////
 void CFreqCtrl::SetBkColor(QColor cr)
 {
-    m_UpdateAll = TRUE;
+    m_UpdateAll = true;
     m_BkColor = cr;
     for(int i=m_DigStart; i<m_NumDigits; i++)
-        m_DigitInfo[i].modified = TRUE;
-    UpdateCtrl(TRUE);
+        m_DigitInfo[i].modified = true;
+    UpdateCtrl(true);
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -312,9 +312,9 @@
 //////////////////////////////////////////////////////////////////////////////
 void CFreqCtrl::SetUnitsColor(QColor cr)
 {
-    m_UpdateAll = TRUE;
+    m_UpdateAll = true;
     m_UnitsColor = cr;
-    UpdateCtrl(TRUE);
+    UpdateCtrl(true);
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -322,9 +322,9 @@
 //////////////////////////////////////////////////////////////////////////////
 void CFreqCtrl::SetHighlightColor(QColor cr)
 {
-    m_UpdateAll = TRUE;
+    m_UpdateAll = true;
     m_HighlightColor = cr;
-    UpdateCtrl(TRUE);
+    UpdateCtrl(true);
 }
 
 
@@ -335,9 +335,9 @@
 {
     if(all)
     {
-        m_UpdateAll = TRUE;
+        m_UpdateAll = true;
         for(int i=m_DigStart; i<m_NumDigits; i++)
-            m_DigitInfo[i].modified = TRUE;
+            m_DigitInfo[i].modified = true;
     }
     update();
 }
@@ -351,7 +351,7 @@
 //qDebug() <<rect.width() << rect.height();
     m_Pixmap = QPixmap(size());     //resize pixmap to current control size
     m_Pixmap.fill(m_BkColor);
-    m_UpdateAll = TRUE;
+    m_UpdateAll = true;
 }
 
 void CFreqCtrl::leaveEvent( QEvent *  )
@@ -360,10 +360,10 @@
     {
         if( m_DigitInfo[m_ActiveEditDigit].editmode )
         {
-            m_DigitInfo[m_ActiveEditDigit].editmode = FALSE;
-            m_DigitInfo[m_ActiveEditDigit].modified = TRUE;
+            m_DigitInfo[m_ActiveEditDigit].editmode = false;
+            m_DigitInfo[m_ActiveEditDigit].modified = true;
             m_ActiveEditDigit = -1;
-            UpdateCtrl(FALSE);
+            UpdateCtrl(false);
         }
     }
 }
@@ -377,7 +377,7 @@
     if(m_UpdateAll) //if need to redraw everything
     {
         DrawBkGround(painter);
-        m_UpdateAll = FALSE;
+        m_UpdateAll = false;
     }
     // draw any modified digits to the m_MemDC
     DrawDigits(painter);
@@ -403,7 +403,7 @@
             {
                 if( !m_DigitInfo[i].editmode )
                 {
-                    m_DigitInfo[i].editmode = TRUE;
+                    m_DigitInfo[i].editmode = true;
                     m_ActiveEditDigit = i;
                 }
             }
@@ -411,12 +411,12 @@
             {       //un-highlight the previous digit if moved off it
                 if( m_DigitInfo[i].editmode )
                 {
-                    m_DigitInfo[i].editmode = FALSE;
-                    m_DigitInfo[i].modified = TRUE;
+                    m_DigitInfo[i].editmode = false;
+                    m_DigitInfo[i].modified = true;
                 }
             }
         }
-        UpdateCtrl(FALSE);
+        UpdateCtrl(false);
     }
 }
 
@@ -496,7 +496,7 @@
 /////////////////////////////////////////////////////////////////////
 void CFreqCtrl::keyPressEvent( QKeyEvent * event )
 {   //call base class if dont over ride key
-bool fSkipMsg = FALSE;
+bool fSkipMsg = false;
 qint64 tmp;
 //qDebug() <<event->key();
     switch(event->key())
@@ -522,43 +522,43 @@
                 }
             }
             MoveCursorRight();
-            fSkipMsg = TRUE;
+            fSkipMsg = true;
             break;
         case Qt::Key_Left:
             if( m_ActiveEditDigit != -1 )
             {
                 MoveCursorLeft();
-                fSkipMsg = TRUE;
+                fSkipMsg = true;
             }
             break;
         case Qt::Key_Up:
             if(m_ActiveEditDigit != -1 )
             {
                 IncFreq();
-                fSkipMsg = TRUE;
+                fSkipMsg = true;
             }
             break;
         case Qt::Key_Down:
             if(m_ActiveEditDigit != -1)
             {
                 DecFreq();
-                fSkipMsg = TRUE;
+                fSkipMsg = true;
             }
             break;
         case Qt::Key_Right:
             if(m_ActiveEditDigit != -1 )
             {
                 MoveCursorRight();
-                fSkipMsg = TRUE;
+                fSkipMsg = true;
             }
             break;
         case Qt::Key_Home:
             CursorHome();
-            fSkipMsg = TRUE;
+            fSkipMsg = true;
             break;
         case Qt::Key_End:
             CursorEnd();
-            fSkipMsg = TRUE;
+            fSkipMsg = true;
             break;
         default:
             break;
@@ -656,7 +656,7 @@
                 Painter.setPen(m_DigitColor);
             digchar = '0' + m_DigitInfo[i].val;
             Painter.drawText(m_DigitInfo[i].dQRect, Qt::AlignHCenter|Qt::AlignVCenter, QString().number( m_DigitInfo[i].val ) );
-            m_DigitInfo[i].modified = FALSE;
+            m_DigitInfo[i].modified = false;
         }
     }
 }
