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

网站免费制作教程免费刷seo

网站免费制作教程,免费刷seo,it学校哪个比较好,网站建设项目进展情况qt-C笔记之两个窗口ui的交互 code review! 文章目录 qt-C笔记之两个窗口ui的交互0.运行1.文件结构2.先创建widget项目#xff0c;搞一个窗口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.pro4.2.main.cpp4.3.widget.h4.4.widget.cpp4.5.second_widget.h4.6.second_widget.cpp4.7.widget.ui4.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 c11# 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_BEFORE0x060000 # 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 target4.2.main.cpp 代码 #include widget.h#include QApplicationint 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.hQT_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_H4.4.widget.cpp 代码 #include widget.h #include ui_widget.hWidget::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 QWidgetnamespace 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_H4.6.second_widget.cpp 代码 #include second_widget.h #include ui_second_widget.hsecond_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 version1.0 encodingUTF-8? ui version4.0classWidget/classwidget classQWidget nameWidgetproperty namegeometryrectx0/xy0/ywidth800/widthheight600/height/rect/propertyproperty namewindowTitlestringWidget/string/propertywidget classQLabel namelabelproperty namegeometryrectx350/xy210/ywidth171/widthheight41/height/rect/propertyproperty nametextstringfirst_widget/string/property/widgetwidget classQPushButton namepush_second_widgetproperty namegeometryrectx70/xy340/ywidth281/widthheight51/height/rect/propertyproperty nametextstringopen scond_widget/string/property/widget/widgetresources/connections/ /ui4.8.second_widget.ui 代码 ?xml version1.0 encodingUTF-8? ui version4.0classsecond_widget/classwidget classQWidget namesecond_widgetproperty namegeometryrectx0/xy0/ywidth460/widthheight312/height/rect/propertyproperty namewindowTitlestringForm/string/propertywidget classQLabel namelabelproperty namegeometryrectx100/xy120/ywidth211/widthheight41/height/rect/propertyproperty nametextstringsecond_widget/string/property/widgetwidget classQPushButton namepushButtonproperty namegeometryrectx20/xy210/ywidth411/widthheight41/height/rect/propertyproperty nametextstringclose_second_and_open_first/string/property/widget/widgetresources/connections/ /ui
http://www.hkea.cn/news/14258504/

相关文章:

  • 网站设计酷站学校网站模板 dedecms
  • 网站开发工具中三剑客包括网络营销推广渠道有哪些
  • 林州网站建设公司宁夏建设厅官方网站
  • 眼镜商城网站建设方案京东app下载官网免费下载
  • 中国工程建设造价管理协会网站交换链接营销成功案例
  • 杨浦做网站电子商务网站有哪些类型
  • 襄阳购物网站开发设计php wap网站实现滑动式数据分页
  • 石林彝族网站建设响应式网站模板 视差
  • 广州做购物网站网站建设中 倒计时
  • 明空网络做网站好不好wordpress中文网址转换
  • 专业网站优化哪家好wordpress招商平台
  • 网站上的验证码怎么做i排版 wordpress
  • 帝国+只做网站地图网站建设开发计入什么会计科目
  • 建站成本上传到ftp网站模板
  • wordpress建立购物网站阿哥体育个人网页
  • 宁波个人做网站基于dw的动物网站设计论文
  • 北京网站大全网站名称能用商标做名称吗
  • 越南建设部网站自己做下载网站
  • 烟台做外贸网站建设西安便宜网站建设
  • 服务型网站建设软件开发是编程吗
  • 市级部门网站建设自评报告软件营销网站
  • 网站的网络营销方案自己做个网站需要几个软件
  • 网站建站多少钱北京最大的软件开发公司
  • 网站建设策划书模板网站建设 优化
  • 上海企业网站建站模板交换链接的例子
  • 东莞响应式网站哪家好做视频网站用哪个cms
  • 做网站和视频剪辑用曲面屏网站建设小程序山东
  • 做一个简单的网站需要多少钱怎么做同城网站
  • 清河做网站哪里便宜网络公司经营范围哪些
  • 网站怎么做长尾词网站上传ftp