⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainwin.cpp

📁 程序代码使用说明: (1)所有源代码目录下都提供了Makefile(非Qt)
💻 CPP
字号:
#include "MainWin.h"#include "AppMgrView.h"#include "AppMgrModel.h"#include <QApplication>#include <QPushButton>#include <QHBoxLayout>#include <QVBoxLayout>MainWin::MainWin(const QString& children, MainWin *preWin)     : mChildren(children), mPreWin(preWin){    setGeometry(0, 0, 320, 240);        creatScreen();        connect(mBackBtn, SIGNAL(clicked()), this, SLOT(back()));    connect(mQuitBtn, SIGNAL(clicked()), qApp, SLOT(quit()));}void MainWin::creatScreen(){    mBackBtn = new QPushButton("Back");    mQuitBtn = new QPushButton("Quit");    QHBoxLayout* hLayout = new QHBoxLayout;    hLayout->addWidget(mQuitBtn);    hLayout->addWidget(mBackBtn);    AppMgrView* view = new AppMgrView(this);    AppMgrModel* model = new AppMgrModel(mChildren, this);    view->setModel(model);        QVBoxLayout* mainLayout = new QVBoxLayout;    mainLayout->addLayout(hLayout);    mainLayout->addWidget(view);    mainLayout->setSpacing(20);        setLayout(mainLayout); }void MainWin::back(){    if (mPreWin == NULL)        return;        mPreWin->show();    this->close();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -