I'm new to Qt, and just want to ask. What should I use to make a text box?
Thanks.
Using Rich Text You can use rich text in the Text and Text Input components. To open the rich text editor, select the (Edit) button in Properties > Character > Text.
If you want to provide your users with an editable rich text editor, use QTextEdit. If you want a text browser without hypertext navigation use QTextEdit, and use QTextEdit::setReadOnly() to disable editing. If you just need to display a small piece of rich text use QLabel.
Updated: 03/06/2020 by Computer Hope. Alternatively referred to as a text field, a text box is a section or object on a page that allows a user to enter text. Text boxes are often used on the Internet for pages that require input from a user.
Widgets are the primary elements for creating user interfaces in Qt. Widgets can display data and status information, receive user input, and provide a container for other widgets that should be grouped together. A widget that is not embedded in a parent widget is called a window.
If with text box
you mean it one line
then it should be QLineEdit.
Anyway I suggest you to get a look at some full working samples to learn using all available widgets.
QLineEdit
for textbox
QTextEdit
for textareas
QPushButton
for buttons
Here's the complete component reference: http://doc.qt.digia.com/qt-components-symbian-1.0/qt-components.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With