C++ Qt - 用于文本框的内容
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5592242/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Qt - What to use for a text box
提问by Simplicity
I'm new to Qt, and just want to ask. What should I use to make a text box?
我是 Qt 的新手,只是想问一下。我应该用什么来制作文本框?
Thanks.
谢谢。
回答by neurino
If with text boxyou mean it one linethen it should be QLineEdit.
如果text box你是认真的,one line那么它应该是QLineEdit。
Anyway I suggest you to get a look at some full working samplesto learn using all available widgets.
无论如何,我建议您查看一些完整的工作示例以学习使用所有可用的小部件。
回答by Gowtham Gopalakrishnan
QLineEditfor textbox
QLineEdit用于文本框
QTextEditfor textareas
QTextEdit用于文本区域
QPushButtonfor buttons
QPushButton用于按钮
Here's the complete component reference: http://doc.qt.digia.com/qt-components-symbian-1.0/qt-components.html
这是完整的组件参考:http: //doc.qt.dgia.com/qt-components-symbian-1.0/qt-components.html

