#include <qapplication.h>
#include <qpushbutton.h>
#include <QWidget>
#include <QTextCodec>
#include <QLabel>
#include <QFont>
#include <QtGui/QTextEdit>
#include <QCursor>
#include <QTimerEvent>
#include "ui_hu.h"
class Win : public QWidget, public Ui::Form
{
public:
Win(QWidget *parent = 0):QWidget(parent)
{
TimerCount = 0;
setupUi(this);
startTimer(1000);
}
private:
int TimerCount;
void timerEvent(QTimerEvent* event);
};
void Win::timerEvent(QTimerEvent* event)
{
TimerCount++;
lcdNumber->setProperty("intValue", QVariant(TimerCount));
}
int main( int argc, char *argv[] )
{
QApplication app(argc, argv);
QFont font;
font.setPointSize(50);
font.setFamily(("simhei"));
app.setFont(font);
QTextCodec::setCodecForTr(QTextCodec::codecForName("utf-8"));
app.setOverrideCursor(QCursor(Qt::BlankCursor));//取消鼠标指针
Win MainWin;
MainWin.setWindowFlags(Qt::FramelessWindowHint);
MainWin.show();
return app.exec();
}
文章评论(0条评论)
登录后参与讨论