#include <QApplication>
#include <QTranslator>
#include "translator.h"
#include "mainWindow.h"
int main (int argc, char *argv[])
{
Q_INIT_RESOURCE(app_res);
Application myApp(argc,argv);
translator.load(":/app_ro.ts");
myApp.installTranslator(&translator);
mainWindow *myMainWindow = new mainWindow();
myMainWindow->show();
return myApp.exec();
}
#include <QApplication>
#include <QTranslator>
#include "translator.h"
#include "mainWindow.h"
int main (int argc, char *argv[])
{
Q_INIT_RESOURCE(app_res);
Application myApp(argc,argv);
QTranslator translator;
translator.load(":/app_ro.ts");
myApp.installTranslator(&translator);
mainWindow *myMainWindow = new mainWindow();
myMainWindow->show();
return myApp.exec();
}
To copy to clipboard, switch view to plain text mode
#include <QtGui>
#include "mainWindow.h"
#include "optionDialog.h"
mainWindow::mainWindow()
{
ui.setupUi(this);
setWindowTitle(tr("CombSys"));
resize(700,600);
//define background color
ui.frame->setPalette(*backPalette);
ui.loginFrame_3->setAutoFillBackground(1);
ui.loginFrame_3->setPalette(*backPalette);
//draw image
if (pixmap.load(":/linuxconf.png"))
{
ui.imageLabel->setPixmap(pixmap);
ui.imageLabel->show();
ui.imageLabel->setText("");
}
else QMessageBox::critical(0,
"Error",
"Unable to load image. ");
createActions();
createMenus();
createToolBars();
createStatusBar();
connect(button1,SIGNAL(clicked()),this,SLOT(close()));
connect(button2, SIGNAL(clicked()), this, SLOT(open1()));
connect(button3, SIGNAL(clicked()), this, SLOT(open2()));
connect(button4, SIGNAL(clicked()), this, SLOT(open3()));
connect(button5, SIGNAL(clicked()), this, SLOT(open4()));
}
#include <QtGui>
#include "mainWindow.h"
#include "optionDialog.h"
mainWindow::mainWindow()
{
ui.setupUi(this);
setWindowTitle(tr("CombSys"));
resize(700,600);
//define background color
QPalette *backPalette = new QPalette;
backPalette->setColor(QPalette::Background, QColor(100,100,100));
ui.frame->setPalette(*backPalette);
ui.loginFrame_3->setAutoFillBackground(1);
ui.loginFrame_3->setPalette(*backPalette);
//draw image
QPixmap pixmap;
if (pixmap.load(":/linuxconf.png"))
{
ui.imageLabel->setPixmap(pixmap);
ui.imageLabel->show();
ui.imageLabel->setText("");
}
else QMessageBox::critical(0,"Error","Unable to load image. ");
createActions();
createMenus();
createToolBars();
createStatusBar();
connect(button1,SIGNAL(clicked()),this,SLOT(close()));
connect(button2, SIGNAL(clicked()), this, SLOT(open1()));
connect(button3, SIGNAL(clicked()), this, SLOT(open2()));
connect(button4, SIGNAL(clicked()), this, SLOT(open3()));
connect(button5, SIGNAL(clicked()), this, SLOT(open4()));
}
To copy to clipboard, switch view to plain text mode
Bookmarks