当前位置: 首页>>代码示例>>Golang>>正文


Golang widgets.QLineEdit类代码示例

本文整理汇总了Golang中github.com/therecipe/qt/widgets.QLineEdit的典型用法代码示例。如果您正苦于以下问题:Golang QLineEdit类的具体用法?Golang QLineEdit怎么用?Golang QLineEdit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了QLineEdit类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: accessChanged

func accessChanged(accessLineEdit *widgets.QLineEdit, index int) {
	switch index {
	case 0:
		accessLineEdit.SetReadOnly(false)
	case 1:
		accessLineEdit.SetReadOnly(true)
	}
}
开发者ID:xland,项目名称:qt,代码行数:8,代码来源:widgets.go

示例2: validatorChanged

func validatorChanged(validatorLineEdit *widgets.QLineEdit, index int) {
	switch index {
	case 0:
		validatorLineEdit.SetValidator(nil)
	case 1:
		validatorLineEdit.SetValidator(gui.NewQIntValidator(validatorLineEdit))
	case 2:
		validatorLineEdit.SetValidator(gui.NewQDoubleValidator(validatorLineEdit)) // TODO: Min/Max
	}

	validatorLineEdit.Clear()
}
开发者ID:xland,项目名称:qt,代码行数:12,代码来源:widgets.go

示例3: echoChanged

func echoChanged(echoLineEdit *widgets.QLineEdit, index int) {
	switch index {
	case 0:
		echoLineEdit.SetEchoMode(widgets.QLineEdit__Normal)
	case 1:
		echoLineEdit.SetEchoMode(widgets.QLineEdit__Password)
	case 2:
		echoLineEdit.SetEchoMode(widgets.QLineEdit__PasswordEchoOnEdit)
	case 3:
		echoLineEdit.SetEchoMode(widgets.QLineEdit__NoEcho)
	}
}
开发者ID:xland,项目名称:qt,代码行数:12,代码来源:widgets.go

示例4: alignmentChanged

func alignmentChanged(alignmentLineEdit *widgets.QLineEdit, index int) {
	switch index {
	case 0:
		alignmentLineEdit.SetAlignment(core.Qt__AlignLeft)
	case 1:
		alignmentLineEdit.SetAlignment(core.Qt__AlignCenter)
	case 2:
		alignmentLineEdit.SetAlignment(core.Qt__AlignRight)
	}
}
开发者ID:xland,项目名称:qt,代码行数:10,代码来源:widgets.go

示例5: validatorChanged

func validatorChanged(validatorLineEdit *widgets.QLineEdit, index int) {
	switch index {
	case 0:
		{
			validatorLineEdit.SetValidator(nil)
		}

	case 1:
		{
			validatorLineEdit.SetValidator(gui.NewQIntValidator(validatorLineEdit))
		}

	case 2:
		{
			validatorLineEdit.SetValidator(gui.NewQDoubleValidator(validatorLineEdit)) //TODO: gui.NewQDoubleValidator2(-999.0, 999.0, 2, validatorLineEdit)
		}
	}

	validatorLineEdit.Clear()
}
开发者ID:mouse225,项目名称:qt,代码行数:20,代码来源:line_edits.go

示例6: inputMaskChanged

func inputMaskChanged(inputMaskLineEdit *widgets.QLineEdit, index int) {
	switch index {
	case 0:
		inputMaskLineEdit.SetInputMask("")
	case 1:
		inputMaskLineEdit.SetInputMask("+99 99 99 99 99;_")
	case 2:
		inputMaskLineEdit.SetInputMask("0000-00-00")
		inputMaskLineEdit.SetText("00000000")
		inputMaskLineEdit.SetCursorPosition(0)
	case 3:
		inputMaskLineEdit.SetInputMask(">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#")
	}
}
开发者ID:xland,项目名称:qt,代码行数:14,代码来源:widgets.go


注:本文中的github.com/therecipe/qt/widgets.QLineEdit类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。