mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 21:40:52 -05:00 
			
		
		
		
	2. Option for user to set default fonts. 3. Minor tweaks to GUI appearance. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3150 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
		
			
				
	
	
		
			25 lines
		
	
	
		
			587 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			587 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#include <QtGui>
 | 
						|
#include <QtGui/QApplication>
 | 
						|
#include "mainwindow.h"
 | 
						|
 | 
						|
int main(int argc, char *argv[])
 | 
						|
{
 | 
						|
  QApplication a(argc, argv);
 | 
						|
 | 
						|
  QFile f("fonts.txt");
 | 
						|
  if(f.open(QIODevice::ReadOnly)) {
 | 
						|
     QTextStream in(&f);                          //Example:
 | 
						|
     QString fontFamily;                          // helvetica
 | 
						|
     qint32 fontSize,fontWeight;                  // 8,50
 | 
						|
     in >> fontFamily >> fontSize >> fontWeight;
 | 
						|
     f.close();
 | 
						|
     QFont font;
 | 
						|
     font=QFont(fontFamily,fontSize,fontWeight);
 | 
						|
     a.setFont(font);
 | 
						|
  }
 | 
						|
 | 
						|
  MainWindow w;
 | 
						|
  w.show();
 | 
						|
  return a.exec();
 | 
						|
}
 |