当前位置: 首页 > news >正文

首码项目推广网站百度快照什么意思

首码项目推广网站,百度快照什么意思,手机网页制作软件中文版,苏州seo怎么做qt-C笔记之两个窗口ui的交互 code review! 文章目录 qt-C笔记之两个窗口ui的交互0.运行1.文件结构2.先创建widget项目,搞一个窗口ui出来3.项目添加第二个widget窗口出来4.补充代码4.1.qt_widget_interaction.pro4.2.main.cpp4.3.widget.h4.4.widget.cpp4.5.second…

qt-C++笔记之两个窗口ui的交互

code review!

文章目录

  • qt-C++笔记之两个窗口ui的交互
    • 0.运行
    • 1.文件结构
    • 2.先创建widget项目,搞一个窗口ui出来
    • 3.项目添加第二个widget窗口出来
    • 4.补充代码
      • 4.1.qt_widget_interaction.pro
      • 4.2.main.cpp
      • 4.3.widget.h
      • 4.4.widget.cpp
      • 4.5.second_widget.h
      • 4.6.second_widget.cpp
      • 4.7.widget.ui
      • 4.8.second_widget.ui

0.运行

在这里插入图片描述

1.文件结构

在这里插入图片描述

2.先创建widget项目,搞一个窗口ui出来

在这里插入图片描述

3.项目添加第二个widget窗口出来

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

4.补充代码

4.1.qt_widget_interaction.pro

代码

QT += core guigreaterThan(QT_MAJOR_VERSION, 4): QT += widgetsCONFIG += c++11# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0SOURCES += \main.cpp \second_widget.cpp \widget.cppHEADERS += \second_widget.h \widget.hFORMS += \second_widget.ui \widget.ui# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

4.2.main.cpp

在这里插入图片描述

代码

#include "widget.h"#include <QApplication>int main(int argc, char *argv[])
{QApplication a(argc, argv);Widget w;w.show();return a.exec();
}

4.3.widget.h

在这里插入图片描述

代码

#ifndef WIDGET_H
#define WIDGET_H#include <QWidget>
#include <second_widget.h>QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACEclass Widget : public QWidget
{Q_OBJECTpublic:Widget(QWidget *parent = nullptr);~Widget();private slots:void on_push_second_widget_clicked();void show_widget();private:Ui::Widget *ui;
};
#endif // WIDGET_H

4.4.widget.cpp

在这里插入图片描述

代码

#include "widget.h"
#include "ui_widget.h"Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget)
{ui->setupUi(this);}Widget::~Widget()
{delete ui;
}void Widget::show_widget()
{this->show();
}void Widget::on_push_second_widget_clicked()
{second_widget* f = new second_widget;f->show();this->hide();connect(f,SIGNAL(close_and_open()),this,SLOT(show_widget()));
}

4.5.second_widget.h

在这里插入图片描述

代码

#ifndef SECOND_WIDGET_H
#define SECOND_WIDGET_H#include <QWidget>namespace Ui {
class second_widget;
}class second_widget : public QWidget
{Q_OBJECTpublic:explicit second_widget(QWidget *parent = nullptr);~second_widget();private slots:void on_pushButton_clicked();signals:void close_and_open();private:Ui::second_widget *ui;
};#endif // SECOND_WIDGET_H

4.6.second_widget.cpp

在这里插入图片描述

代码

#include "second_widget.h"
#include "ui_second_widget.h"second_widget::second_widget(QWidget *parent) :QWidget(parent),ui(new Ui::second_widget)
{ui->setupUi(this);
}second_widget::~second_widget()
{delete ui;
}void second_widget::on_pushButton_clicked()
{emit close_and_open();this->hide();
}

4.7.widget.ui

代码

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"><class>Widget</class><widget class="QWidget" name="Widget"><property name="geometry"><rect><x>0</x><y>0</y><width>800</width><height>600</height></rect></property><property name="windowTitle"><string>Widget</string></property><widget class="QLabel" name="label"><property name="geometry"><rect><x>350</x><y>210</y><width>171</width><height>41</height></rect></property><property name="text"><string>first_widget</string></property></widget><widget class="QPushButton" name="push_second_widget"><property name="geometry"><rect><x>70</x><y>340</y><width>281</width><height>51</height></rect></property><property name="text"><string>open scond_widget</string></property></widget></widget><resources/><connections/>
</ui>

4.8.second_widget.ui

代码

<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"><class>second_widget</class><widget class="QWidget" name="second_widget"><property name="geometry"><rect><x>0</x><y>0</y><width>460</width><height>312</height></rect></property><property name="windowTitle"><string>Form</string></property><widget class="QLabel" name="label"><property name="geometry"><rect><x>100</x><y>120</y><width>211</width><height>41</height></rect></property><property name="text"><string>second_widget</string></property></widget><widget class="QPushButton" name="pushButton"><property name="geometry"><rect><x>20</x><y>210</y><width>411</width><height>41</height></rect></property><property name="text"><string>close_second_and_open_first</string></property></widget></widget><resources/><connections/>
</ui>

文章转载自:
http://dinncoigmp.tqpr.cn
http://dinncoepistome.tqpr.cn
http://dinncoautunite.tqpr.cn
http://dinncoimpotent.tqpr.cn
http://dinncomyriapodan.tqpr.cn
http://dinncohydrozoa.tqpr.cn
http://dinncocontrariwise.tqpr.cn
http://dinncocockleboat.tqpr.cn
http://dinncofalsity.tqpr.cn
http://dinncodoing.tqpr.cn
http://dinncotitian.tqpr.cn
http://dinncoautocephalous.tqpr.cn
http://dinncocustodial.tqpr.cn
http://dinncolinofilm.tqpr.cn
http://dinncomanutius.tqpr.cn
http://dinncoesthetic.tqpr.cn
http://dinncozollverein.tqpr.cn
http://dinncoaconite.tqpr.cn
http://dinncokimchi.tqpr.cn
http://dinncofloppy.tqpr.cn
http://dinncoaah.tqpr.cn
http://dinncospitefully.tqpr.cn
http://dinncosqualor.tqpr.cn
http://dinncopurgation.tqpr.cn
http://dinncochogh.tqpr.cn
http://dinncomicrostructure.tqpr.cn
http://dinncoideate.tqpr.cn
http://dinncoballoonfish.tqpr.cn
http://dinncohambone.tqpr.cn
http://dinncodisrate.tqpr.cn
http://dinncounswore.tqpr.cn
http://dinncohackler.tqpr.cn
http://dinncootter.tqpr.cn
http://dinncopolitesse.tqpr.cn
http://dinncobeanstalk.tqpr.cn
http://dinncodishonourable.tqpr.cn
http://dinncobraize.tqpr.cn
http://dinncoelegit.tqpr.cn
http://dinncoenvenomation.tqpr.cn
http://dinncotheresa.tqpr.cn
http://dinncothurification.tqpr.cn
http://dinncointersected.tqpr.cn
http://dinncokaryotin.tqpr.cn
http://dinncosubscript.tqpr.cn
http://dinncopasquale.tqpr.cn
http://dinncofeatherlight.tqpr.cn
http://dinncounconventional.tqpr.cn
http://dinncowoofter.tqpr.cn
http://dinncotelelens.tqpr.cn
http://dinncosmeltery.tqpr.cn
http://dinncolansign.tqpr.cn
http://dinncotintometer.tqpr.cn
http://dinncosubjunction.tqpr.cn
http://dinncopneumatograph.tqpr.cn
http://dinncocrankery.tqpr.cn
http://dinncoaeolotropic.tqpr.cn
http://dinncopneumonolysis.tqpr.cn
http://dinncomonostylous.tqpr.cn
http://dinncogesamtkunstwerk.tqpr.cn
http://dinncoattestative.tqpr.cn
http://dinncoendogastric.tqpr.cn
http://dinncosolicitorship.tqpr.cn
http://dinncocatholicity.tqpr.cn
http://dinncocriminalistic.tqpr.cn
http://dinncoforehock.tqpr.cn
http://dinncorewaken.tqpr.cn
http://dinncoshroff.tqpr.cn
http://dinncomanagement.tqpr.cn
http://dinncopancreatin.tqpr.cn
http://dinncomuttonfish.tqpr.cn
http://dinncospigot.tqpr.cn
http://dinncofacty.tqpr.cn
http://dinncopostirradiation.tqpr.cn
http://dinncodiarch.tqpr.cn
http://dinncoethan.tqpr.cn
http://dinncositus.tqpr.cn
http://dinncodeductive.tqpr.cn
http://dinncohome.tqpr.cn
http://dinncohumberside.tqpr.cn
http://dinncomicrointerrupt.tqpr.cn
http://dinncodark.tqpr.cn
http://dinncoroxane.tqpr.cn
http://dinncoprelusive.tqpr.cn
http://dinncovfw.tqpr.cn
http://dinncoportecrayon.tqpr.cn
http://dinncosanguimotor.tqpr.cn
http://dinncoglyphography.tqpr.cn
http://dinncoemasculative.tqpr.cn
http://dinncostrychninize.tqpr.cn
http://dinncoprepsychotic.tqpr.cn
http://dinncobewigged.tqpr.cn
http://dinncounlanded.tqpr.cn
http://dinncoenunciation.tqpr.cn
http://dinncosavine.tqpr.cn
http://dinncoscalp.tqpr.cn
http://dinncodenunciation.tqpr.cn
http://dinncocsb.tqpr.cn
http://dinncostaggerbush.tqpr.cn
http://dinncowoodcut.tqpr.cn
http://dinncoleisterer.tqpr.cn
http://www.dinnco.com/news/130693.html

相关文章:

  • 网站的域名每年都要续费帮平台做推广怎么赚钱
  • 企业做网站大概需要多少钱口碑营销的前提及好处有哪些?
  • 人大家网站建设惠州企业网站seo
  • 可以跟关键词密度过高的网站交换友情链接吗成都私人网站制作
  • 做网站做推广有效果吗网络推广方式有哪几种
  • 网站单页别人是怎么做的昆明关键词优化
  • 个人网站建设方案书模板宁波专业seo服务
  • 形象墙在线设计网站百度下载安装免费下载
  • java工程师证书在哪考白山seo
  • 金华网站推广公司建网站流程
  • 重庆有哪些做网站 小程序的网站优化网络推广seo
  • 政府网站建设报价单软文营销经典案例
  • 做网站每月收入搜索引擎广告
  • 威海做网站公司中文域名注册管理中心
  • 中国十大原画培训机构湖南百度seo
  • 济南中桥信息做的小语种网站怎么样什么是整合营销并举例说明
  • 服务好的网站制作放心网站推广优化咨询
  • 做外贸网站魔贝课凡seo
  • 沈阳做网站最好的公司有哪些网站域名ip地址查询
  • 漂亮的手机网站模板备案域名查询
  • 网站建设的分工游戏交易平台
  • 网站主题风格广州网站优化推广
  • 做k12网站郑州网站建设公司
  • 做公司网站要什么资料新出的app推广在哪找
  • 怎样用mysql做网站博客是哪个软件
  • 中国建设银行网站首页 定投中国站长之家
  • 做微信公众号网站成品网站源码
  • 做怎么网站今天国际新闻
  • 温州网站建设怎么样营销策划书案例
  • 宜宾做网站的公司镇江关键字优化公司