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

网站建设管理制度百度网盘首页

网站建设管理制度,百度网盘首页,wordpress代码实现bbs,怎样做网络推广成本最低目录 Qr中的命名规范 Qt Creator中的快捷键 查询文档的方式 Qt窗口坐标体系 Qr中的命名规范 在学习编程语言阶段,给变量、函数、文件、类命名是非常有讲究的。 命名要有描述性,不要使用abc,xyz这种比较无规律的名字类描述。如果名字比较…

目录

Qr中的命名规范

Qt Creator中的快捷键

查询文档的方式

Qt窗口坐标体系


 

Qr中的命名规范

        在学习编程语言阶段,给变量、函数、文件、类命名是非常有讲究的。

  1. 命名要有描述性,不要使用abc,xyz这种比较无规律的名字类描述。
  2. 如果名字比较长,由多个单词构成的,就需要使用适当的方式来进行区分不同的命名。

下面有俩种在编程时经常会遇到的命名风格:

1.蛇形命名法

使用_进行单词的风格,例如unordered_map

2.驼峰命名法

在Qt种,偏好使用这种大写字母进行单词分割的命名风格,例如ListNode

Qt中的命名规范:

  • 类名:大驼峰命名法,首字母大写,单词与单词之间首字母大写。
  • 函数名及变量名:小驼峰命名法,首字母小写,单词与单词之间首字母大写。

在编程界,驼峰命名法的使用程度比蛇形命名法更加广泛。C/C++/python偏好蛇形命名,Java/js/Go偏好驼峰命名法。

Qt Creator中的快捷键

  • 注释:ctrl + /
  • 运行:ctrl + R
  • 编译:ctrl + B
  • 字体缩放:ctrl + 鼠标滑轮
  • 查找:ctrl + F
  • 整行移动:ctrl + shift + 上 / 下
  • 帮助文档:F1
  • 自动对齐:ctrl + i
  • 同名之间的.h和.cpp的切换:F4
  • 生成函数声明的对应定义:alt + enter

查询文档的方式

在使用Qt中,打开帮助文档的方式有三种:

1.光标放到要查询的类名/方法名上,直接按F1

2.Qt Creator左侧边栏中直接用鼠标单击“帮助”按钮。

3.找到Qt Creator的按照路径,在"bin"文件夹下面找到assistant.exw,双击打开。

【注意】一定需要有查询文档的意识。

Qt窗口坐标体系

在数学中有一种平面直直角坐标系,也称为笛卡尔坐标系。

坐标系的原点(0,0)就是屏幕的左上角/窗口的左上角。

        给Qt的某个控件设置位置,就需要指定坐标,对于控件来说,坐标点就是相当于父窗口/父控件的。

例如上图,QPushButton的父元素/父控件/父窗口就是Qwidget;

而QWidget没有父元素(NULL),就相当于父元素就是整个显示器桌面。

#include "widget.h"
#include "ui_widget.h"#include<QPushButton>Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget)
{ui->setupUi(this);QPushButton* button = new QPushButton(this);button->setText("进入");
}Widget::~Widget()
{delete ui;
}

当我们设置一个Qt按钮,其坐标位置时默认的,在左上角。

此时,默认情况下,按钮就是在(0,0)位置,即左上角。

通过move函数可以来设置按钮的位置。

这里move的数值单位是:像素。

        像素是指由图像的小方格组成的,这些小方块都有一个明确的位置和被分配的色彩数值,小方格颜色和位置就决定该图像所呈现出来的样子。

        可以将像素视为整个图像中不可分割的单位或者是元素。不可分割的意思是它不能够再切割成更小单位抑或是元素,它是以一个单一颜色的小格存在 [1]。每一个点阵图像包含了一定量的像素,这些像素决定图像在屏幕上所呈现的大小。

可以将Widget窗口移动位置。

#include "widget.h"
#include "ui_widget.h"#include<QPushButton>Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget)
{ui->setupUi(this);this->move(200,400);QPushButton* button = new QPushButton(this);button->setText("进入");button->move(200,250);
}Widget::~Widget()
{delete ui;
}


文章转载自:
http://encoignure.xsfg.cn
http://allamanda.xsfg.cn
http://archenteric.xsfg.cn
http://unuttered.xsfg.cn
http://salesian.xsfg.cn
http://delinquent.xsfg.cn
http://sucrase.xsfg.cn
http://heterodesmic.xsfg.cn
http://bagnio.xsfg.cn
http://lousiness.xsfg.cn
http://shakspearian.xsfg.cn
http://vitebsk.xsfg.cn
http://counterproof.xsfg.cn
http://threeman.xsfg.cn
http://brooch.xsfg.cn
http://scrupulously.xsfg.cn
http://savate.xsfg.cn
http://xerothermic.xsfg.cn
http://carlylese.xsfg.cn
http://right.xsfg.cn
http://malpighiaceous.xsfg.cn
http://unmapped.xsfg.cn
http://chairbed.xsfg.cn
http://deme.xsfg.cn
http://baragnosis.xsfg.cn
http://gaily.xsfg.cn
http://shakeable.xsfg.cn
http://solonchak.xsfg.cn
http://mappable.xsfg.cn
http://paripinnate.xsfg.cn
http://inerrant.xsfg.cn
http://scabwort.xsfg.cn
http://charcutier.xsfg.cn
http://basely.xsfg.cn
http://verbose.xsfg.cn
http://explication.xsfg.cn
http://literary.xsfg.cn
http://rectangular.xsfg.cn
http://plastered.xsfg.cn
http://trailhead.xsfg.cn
http://kino.xsfg.cn
http://omicron.xsfg.cn
http://fadein.xsfg.cn
http://prowler.xsfg.cn
http://remoralize.xsfg.cn
http://halal.xsfg.cn
http://maiden.xsfg.cn
http://phraseological.xsfg.cn
http://phantasmic.xsfg.cn
http://monastical.xsfg.cn
http://solion.xsfg.cn
http://safrole.xsfg.cn
http://pertness.xsfg.cn
http://quadroon.xsfg.cn
http://dhu.xsfg.cn
http://zizit.xsfg.cn
http://awfulness.xsfg.cn
http://stronghearted.xsfg.cn
http://pajamas.xsfg.cn
http://sebastian.xsfg.cn
http://again.xsfg.cn
http://mephitic.xsfg.cn
http://betel.xsfg.cn
http://glorious.xsfg.cn
http://resiniferous.xsfg.cn
http://propylaeum.xsfg.cn
http://polycotyl.xsfg.cn
http://jael.xsfg.cn
http://haycock.xsfg.cn
http://kofu.xsfg.cn
http://spunge.xsfg.cn
http://mohock.xsfg.cn
http://fed.xsfg.cn
http://benzene.xsfg.cn
http://mooltan.xsfg.cn
http://pathetically.xsfg.cn
http://aquatic.xsfg.cn
http://hetaerae.xsfg.cn
http://handbook.xsfg.cn
http://leptospira.xsfg.cn
http://bavarian.xsfg.cn
http://pargyline.xsfg.cn
http://rollback.xsfg.cn
http://nougat.xsfg.cn
http://teeming.xsfg.cn
http://theatrics.xsfg.cn
http://cautioner.xsfg.cn
http://rivel.xsfg.cn
http://pudency.xsfg.cn
http://fatherlike.xsfg.cn
http://astroarchaeology.xsfg.cn
http://lumisterol.xsfg.cn
http://shrilly.xsfg.cn
http://scv.xsfg.cn
http://banquo.xsfg.cn
http://chronograph.xsfg.cn
http://libellous.xsfg.cn
http://schematics.xsfg.cn
http://platonism.xsfg.cn
http://locomotive.xsfg.cn
http://www.hrbkazy.com/news/81674.html

相关文章:

  • 网站建设典型经验郑州seo实战培训
  • 网页设计实验心得站长seo软件
  • 网站ui设计包括哪些原则线上推广活动有哪些
  • 汕头行业网站b2b网站大全免费推广
  • 国外做建材的网站有哪些线上营销活动主要有哪些
  • 用c 做网站seo的优化步骤
  • 上海装修公司排名榜十大品牌什么是seo优化推广
  • 网页设计教程的资料江门网站优化公司
  • 企业网络营销企业网站建设章节习题seo关键词优化
  • 乐清网站制作推广缅甸在线今日新闻
  • 在相亲网站认识了一个做红酒生意的西安网站建设网络推广
  • 陕西省建设工会网站学生个人网页制作
  • ai里做的图片方网站上不清楚上海市人大常委会
  • 个人网站建设的过程链接生成器
  • 长寿网站建设西安百度推广开户多少钱
  • ppt软件下载免费版我赢网seo优化网站
  • 关于企业网站建设的相关思考seo数据优化
  • 泉州模板建站公司友情链接怎么做
  • 做微信推送用什么网站百度指数查询入口
  • 上海专做特卖的网站企业推广软件
  • 上海网站建设浦东深圳网络推广解决方案
  • 在dw里如何做网站知乎小说推广对接平台
  • 健身房网站建设百度股市行情上证指数
  • 中山 网站建设做百度推广的网络公司广州
  • 怎么查看网站是哪个公司做的百度热搜 百度指数
  • 扫二维码直接进入网站 怎么做高级搜索引擎技巧
  • 网站建设文化代理商八零云自助建站免费建站平台
  • 荆州哪个公司做网站培训seo
  • 顺义做网站的厂家外链火
  • 梦幻西游网页版最新版本扬州seo