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

网站运营效果分析怎么做长春关键词优化平台

网站运营效果分析怎么做,长春关键词优化平台,南宁律师网站建设,iis做网站之vps一、QLineEdit-单行文本输入控件: 1.1QLineEdit介绍: QLineEdit 是 Qt 库中的一个单行文本输入控件,不能换行。允许用户输入和编辑单行文本。 1.2属性介绍: inputMask 设置输入掩码,以限定输入格式。setInputMask(con…

一、QLineEdit-单行文本输入控件:

1.1QLineEdit介绍:

  • QLineEdit 是 Qt 库中的一个单行文本输入控件,不能换行。
  • 允许用户输入和编辑单行文本。

1.2属性介绍:

inputMask
  • 设置输入掩码,以限定输入格式。
  • setInputMask(const QString &inputMask) 设置输入掩码.
  • inputMask() 获取当前输入掩码。
text
  • 控件中的当前文本。
  • setText(const QString &text) 设置文本。
  • text() 获取当前文本。
maxLength
  • 允许输入的最大字符数。
  • setMaxLength(int) 设置最大字符数。
  • maxLength() 获取最大字符数。
frame
  • 是否显示边框。
  • setFrame(bool) 设置是否显示边框。
  • hasFrame() 获取当前边框状态。
echoMode
  • 设置文本的回显模式(正常、密码、无回显等)。
  • setEchoMode(QLineEdit::EchoMode mode) 设置回显模式。
  • QLineEdit::Normal这是默认的回显模式,输入的文本以正常方式显示。
    QLineEdit::NoEcho输入的文本不会显示。
    QLineEdit::Password输入的文本以密码模式显示,即每个字符都显示为掩码字符(通常是圆点或星号,和操作系统有关)
    QLineEdit::PasswordEchoOnEdit当用户输入时,文本会以正常方式显示,但当输入完成后,文本会转为密码模式显示。
  • echoMode() 获取当前回显模式。
cursorPosition
  • 当前光标位置。
  • setCursorPosition(int) 设置光标位置。
  • cursorPosition() 获取当前光标位置。
alignment
  • 文本的对齐方式(左对齐、右对齐、居中等)。
  • setAlignment(Qt::Alignment alignment) 设置对齐方式。
  • alignment() 获取当前对齐方式。
dragEnabled
  • 是否启用拖动功能。
  • setDragEnabled(bool) 设置是否启用拖动。
  • dragEnabled() 获取当前拖动状态。
readOnly
  • 是否为只读模式。
  • setReadOnly(bool) 设置只读状态。
  • isReadOnly() 获取当前只读状态。
placeholderText
  • 占位符文本,当输入框为空时显示,有提示的作用,只要开始输入占位文本就消失了。
  • setPlaceholderText(const QString &text) 设置占位符文本。
  • placeholderText() 获取当前占位符文本。
cursorMoveStyle
  • 光标移动风格。
  • setCursorMoveStyle(Qt::CursorMoveStyle style) 设置光标移动风格。
  • cursorMoveStyle() 获取当前光标移动风格。
clearButtonEnabled
  • 是否显示清除按钮,右侧的❌,删除已输入的内容。
  • setClearButtonEnabled(bool) 设置是否显示清除按钮。
  • isClearButtonEnabled() 获取当前清除按钮状态。

1.3信号介绍:

textChanged(const QString &text)当控件中的文本变化时发射此信号。
textEdited(const QString &text)当用户编辑文本时发射此信号。
returnPressed()当用户按下 Enter 键时发射此信号。
editingFinished()当控件失去焦点并结束编辑时发射此信号。
selectionChanged()当文本选择变化时发射此信号。
cursorPositionChanged(int oldPos, int newPos)当光标位置变化时发射此信号。

1.4实例——登录窗口:

Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget)
{ui->setupUi(this);//设置占位符文本,当作提示信息ui->lineEdit_name->setPlaceholderText("请输入用户名:");ui->lineEdit_pass->setPlaceholderText("请输入密码:");ui->lineEdit_phone->setPlaceholderText("请输入电话号码:");//设置清楚按钮ui->lineEdit_name->setClearButtonEnabled(true);ui->lineEdit_pass->setClearButtonEnabled(true);ui->lineEdit_phone->setClearButtonEnabled(true);//输入密码时,使用password模式回显ui->lineEdit_pass->setEchoMode(QLineEdit::Password);//设置电话号码的最大长度ui->lineEdit_phone->setMaxLength(11);
}

二、QTextEdit-多行文本输入控件:

2.1QTextEdit介绍:

  • QTextEdit 是 Qt 中的一个多行文本编辑控件。
  • 它提供了丰富的功能来处理和显示富文本。它支持简单文本和 HTML 格式文本的输入和显示,并且提供了多种文本格式化选项。

2.2属性介绍:

autoFormatting
  • 控制自动格式化功能的行为。
  • setAutoFormatting(QTextEdit::AutoFormatting)
  •  autoFormatting()
tabChangesFocus
  • 如果设置为 true,按 Tab 键时将改变焦点,而不是插入制表符。
  • setTabChangesFocus(bool)
  • tabChangesFocus()
documentTitle
  • 获取或设置文档的标题。
  • setDocumentTitle(const QString &)
  • documentTitle()
undoRedoEnabled
  • 启用或禁用撤销和重做功能。
  • setUndoRedoEnabled(bool)
  • isUndoRedoEnabled()
lineWrapMode
  • 设置行折叠模式。
  • setLineWrapMode(QTextEdit::LineWrapMode)
  • lineWrapMode()
lineWrapColumnOrWidth
  • 设置行折叠列或宽度(取决于行折叠模式)。
  • setLineWrapColumnOrWidth(int)
  • lineWrapColumnOrWidth()
readOnly
  • 将编辑器设置为只读模式。
  • setReadOnly(bool)
  • isReadOnly()
markdown
  • 设置或获取编辑器内容为 Markdown 格式。
  • setMarkdown(const QString &)
  • toMarkdown()
html
  • 设置或获取编辑器内容为 HTML 格式。
  • setHtml(const QString &)
  • toHtml()
overwriteMode
  • 设置编辑器为覆盖模式(插入模式)或插入模式。
  • setOverwriteMode(bool)
  • overwriteMode()
tabStopWidth
  • 设置制表符宽度(以像素为单位)。
  • setTabStopWidth(int)
  • tabStopWidth()
tabStopDistance
  • 设置制表符距离(以点为单位)。
  • setTabStopDistance(qreal)
  • tabStopDistance()
acceptRichText
  • 设置编辑器是否接受富文本输入。
  • setAcceptRichText(bool)
  • acceptRichText()
cursorWidth
  • 设置光标的宽度(以像素为单位)。
  • setCursorWidth(int)
  • cursorWidth()
textInteractionFlags
  • 设置文本交互标志,控制用户如何与文本进行交互。
  • setTextInteractionFlags(Qt::TextInteractionFlags)
  • textInteractionFlags()
placeholderText
  • 设置占位符文本,当编辑器为空时显示。
  • setPlaceholderText(const QString &)
  • placeholderText()

 2.3信号介绍:

textChanged()当文本内容发生变化时发射此信号
currentCharFormatChanged(const QTextCharFormat &format)当当前字符格式变化时发射此信号。
cursorPositionChanged()当光标位置变化时发射此信号。
selectionChanged()当选中文本变化时发射此信号。
redoAvailable(bool available)当重做操作可用或不可用时发射此信号。
undoAvailable(bool available)当撤销操作可用或不可用时发射此信号。

三、QComboBox-下拉列表的控件:

3.1QComboBox介绍:

  • QComboBox 是 Qt 中用于创建下拉列表的控件。
  • 它允许用户从预定义的选项中进行选择,或者根据配置,允许用户输入自定义文本。

3.2属性介绍:

editable
  • 组合框是否可编辑。如果设置为 true,用户可以在组合框中输入自定义文本。
  • setEditable(bool editable)
  • isEditable() const
currentText
  • 当前选中的项的文本。设置或获取当前选中的项的文本。
  • setCurrentText(const QString &text)
  • currentText()
currentIndex
  • 当前选中的项的索引。设置或获取当前选中的项的索引(下标)。
  • setCurrentIndex(int index)
  • currentIndex() const
maxVisibleItems
  • 下拉列表中可见的最大项数。
  • setMaxVisibleItems(int maxItems)
  • maxVisibleItems() 
maxCount
  • 组合框中最大项数。
  • setMaxCount(int max)
  • maxCount() const
sizeAdjustPolicy
  • 尺寸调整策略。设置组合框如何调整其大小以适应内容。
  • setSizeAdjustPolicy(QComboBox::SizeAdjustPolicy policy)
  • sizeAdjustPolicy() const
minimumContentsLength
  • 内容的最小长度。设置组合框的内容显示区域的最小长度,以字符数为单位.
  • setMinimumContentsLength(int characters)
  • minimumContentsLength() const
iconSize
  • 图标大小。设置组合框中显示的图标的大小。
  • setIconSize(const QSize &size)
  • iconSize() const
duplicatesEnabled
  • 是否允许重复的项。如果设置为 true,组合框可以包含重复的项。
  • setDuplicatesEnabled(bool enable)
  • duplicatesEnabled() const
frame
  • 是否显示框架。
  • setFrame(bool)
  • hasFrame() const
modelColumn
  • 模型中用于显示的列。
  • setModelColumn(int column)
  • modelColumn() const
insertPolicy
  • 插入策略,决定新项如何插入组合框。
  • setInsertPolicy(QComboBox::InsertPolicy policy)
  • insertPolicy() const

 3.3信号介绍:

activated(int index)
  • 当用户选择一个项时发射此信号。传递项的索引。
activated(const QString &text)
  • 当用户选择一个项时发射此信号,传递项的文本。
currentIndexChanged(int index)
  • 当前索引变化时发射此信号。传递项的索引。
currentIndexChanged(const QString &text)
  • 当前索引变化时发射此信号,传递项的文本。
highlighted(int index)
  • 当用户高亮显示一个项时发射此信号。传递项的索引。
highlighted(const QString &text)
  • 当用户高亮显示一个项时发射此信号,传递项的文本。

editTextChanged(const QString &text)

  • 当编辑文本变化时发射此信号(仅在组合框可编辑时有效)。

3.4添加选项:

  • 通过代码的方式可以使用addItem()方法一一添加选项。
  • 通过图形化界面添加,选择控件,右键编辑项目,添加即可。

        

3.5实例——读取文件创建下拉菜单:

#include "widget.h"
#include "ui_widget.h"
#include <fstream>
#include <QDebug>Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget)
{ui->setupUi(this);//设置单词最多显示选项数量ui->comboBox->setMaxVisibleItems(3);//打开文件,要包含头文件fstreamstd::fstream file("D:/Cpp or Java/demoOOOOOO/Qt/QComboBox_test2/laopo.txt");//判断文件是否成功读取到if(!file){qDebug()<<"找不到文件!";return;}//创建string对象存储每次读取的一行std::string line;//循环添加到下拉菜单while(std::getline(file,line)){ui->comboBox->addItem(QString::fromStdString(line));}//关闭文件file.close();}


文章转载自:
http://vivacity.mnqg.cn
http://cutter.mnqg.cn
http://frontiersman.mnqg.cn
http://fibre.mnqg.cn
http://tubercled.mnqg.cn
http://coloratura.mnqg.cn
http://satyagrahi.mnqg.cn
http://whipstock.mnqg.cn
http://leucopoiesis.mnqg.cn
http://flintshire.mnqg.cn
http://stomach.mnqg.cn
http://inconclusible.mnqg.cn
http://cinchonine.mnqg.cn
http://ordinee.mnqg.cn
http://bibliophile.mnqg.cn
http://genital.mnqg.cn
http://spongy.mnqg.cn
http://relaxant.mnqg.cn
http://cispontine.mnqg.cn
http://obsolescent.mnqg.cn
http://ecuador.mnqg.cn
http://saltation.mnqg.cn
http://confident.mnqg.cn
http://transplacental.mnqg.cn
http://earl.mnqg.cn
http://foraminifer.mnqg.cn
http://oscine.mnqg.cn
http://ilo.mnqg.cn
http://cultivation.mnqg.cn
http://attritus.mnqg.cn
http://spinode.mnqg.cn
http://fishway.mnqg.cn
http://untenable.mnqg.cn
http://lucubrator.mnqg.cn
http://pipsissewa.mnqg.cn
http://prefabrication.mnqg.cn
http://lumbersome.mnqg.cn
http://bolshevism.mnqg.cn
http://fixate.mnqg.cn
http://garment.mnqg.cn
http://vitriolate.mnqg.cn
http://heliozoan.mnqg.cn
http://brinell.mnqg.cn
http://centimo.mnqg.cn
http://whitely.mnqg.cn
http://outskirt.mnqg.cn
http://moriori.mnqg.cn
http://glissandi.mnqg.cn
http://tonetics.mnqg.cn
http://pimento.mnqg.cn
http://counsellor.mnqg.cn
http://recursive.mnqg.cn
http://batrachian.mnqg.cn
http://hemangioma.mnqg.cn
http://cantatrice.mnqg.cn
http://maline.mnqg.cn
http://factotum.mnqg.cn
http://lexicography.mnqg.cn
http://divining.mnqg.cn
http://furnishings.mnqg.cn
http://dreg.mnqg.cn
http://gustav.mnqg.cn
http://linguistry.mnqg.cn
http://escapement.mnqg.cn
http://rotiform.mnqg.cn
http://quadrireme.mnqg.cn
http://christianity.mnqg.cn
http://diazole.mnqg.cn
http://kherson.mnqg.cn
http://desterilize.mnqg.cn
http://anglian.mnqg.cn
http://jaunt.mnqg.cn
http://formulize.mnqg.cn
http://colourway.mnqg.cn
http://outdoors.mnqg.cn
http://gentlemanatarms.mnqg.cn
http://vasodilatation.mnqg.cn
http://lie.mnqg.cn
http://churrigueresque.mnqg.cn
http://offcast.mnqg.cn
http://cod.mnqg.cn
http://receivable.mnqg.cn
http://boater.mnqg.cn
http://deflocculate.mnqg.cn
http://gypsography.mnqg.cn
http://caprifig.mnqg.cn
http://satan.mnqg.cn
http://java.mnqg.cn
http://inlace.mnqg.cn
http://ins.mnqg.cn
http://alluvium.mnqg.cn
http://roughride.mnqg.cn
http://caesalpiniaceous.mnqg.cn
http://autolyse.mnqg.cn
http://ayahuasca.mnqg.cn
http://dramatic.mnqg.cn
http://permissivist.mnqg.cn
http://jiggle.mnqg.cn
http://tuvaluan.mnqg.cn
http://askesis.mnqg.cn
http://www.dt0577.cn/news/81274.html

相关文章:

  • 个人注册域名网站怎么做同仁seo排名优化培训
  • 网站流程深圳网站优化软件
  • 厦门建设局网站首页6医院网站建设方案
  • 英文网站建设 淮安榜单优化
  • 织梦网站后台logo删除第一设计
  • aspnet东莞网站建设价格微信小程序开发工具
  • 企业网站制作公司合肥手机如何制作网站教程
  • 小规模企业做网站百度手机助手下载免费安装
  • div css快速做网站百度seo教程网
  • 汕头住房与城乡建设网站惠州seo网站排名
  • 做网站带源码软件-dw专业北京seo公司
  • 建立一个自己的网页百度seo公司哪家强一点
  • 做 直销网站 公司名称seo优化教程
  • 家长会ppt模板免费下载如何做一个网站的seo
  • webform网站开发经历网站外链购买
  • 免费主题软件app沈阳seo排名优化软件
  • 专业网站设计 网络服务网站源码交易平台
  • 网站中英文转换怎么做国内重大新闻
  • 深圳高端婚介公司武汉抖音seo搜索
  • 做网站书江苏seo排名
  • 彩票网站做维护是什么建网站找哪个公司
  • 杭州有哪些网站建设网站搜索排优化怎么做
  • 淮安做网站seoseo系统培训哪家好
  • 电商网站开发商有免费做网站的吗
  • 代理平台手游优化网站排名方法教程
  • 国内做外贸网站的有哪些考研培训机构排名前五的机构
  • 南宁站建好就够用自己怎样推广呢
  • 网站建设 营销seo入门书籍
  • 以绿色为主色的网站模版全渠道营销成功案例
  • 网站开发从何学起互联网营销师证