Qt 主介面選單欄和狀態列實現

2021-09-06 07:36:52 字數 1377 閱讀 4988

因為之前一直用c#來著,最近專案需要跨平台

所以研究qt發現上手也很快

學習qt學習到後面越發現qt有些功能很強大

這裡展示乙個小demo,適合初學者高手繞行。。。

登陸介面

主介面:

**部分:

#ifndef mainwindow_h

#define mainwindow_h#include

#include

"qlabel.h

"namespace

ui class

action;

class mainwindow : public

qmainwindow ;

#endif

//mainwindow_h

#include "

mainwindow.h

"#include

"ui_mainwindow.h

"#include

"qdesktopwidget.h

"#include

"qtextcodec.h

"#include

"qmessagebox.h

"#include

"frmdlg.h

"#include

"qdatetime.h

"#include

"qtimer.h

"#include

"qprogressbar.h

"mainwindow::mainwindow(qwidget *parent) :

qmainwindow(parent),

ui(newui::mainwindow)

"));

}mainwindow::~mainwindow()

void mainwindow::changeevent(qevent *e)

}void

mainwindow::on_action_2_activated()

void

mainwindow::timerupdate()

不做解釋,**基本都有注釋!

Qt 主介面選單欄和狀態列實現

因為之前一直用c 來著,最近專案需要跨平台 所以研究qt發現上手也很快 學習qt學習到後面越發現qt有些功能很強大 這裡展示乙個小demo,適合初學者高手繞行。登陸介面 主介面 部分 ifndef mainwindow h define mainwindow h include include ql...

Qt 主介面選單欄和狀態列實現

因為之前一直用c 來著,最近專案需要跨平台 所以研究qt發現上手也很快 學習qt學習到後面越發現qt有些功能很強大 這裡展示乙個小demo,適合初學者高手繞行。登陸介面 主介面 部分 ifndef mainwindow h define mainwindow h include include ql...

Qt學習筆記 選單欄 工具欄和狀態列

在 動作 筆記中有如下 openaction new qaction qicon images doc open tr open.this openaction setshortcuts qkeysequence open openaction setstatustip tr open an exi...