Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt - What to use for a text box

Tags:

c++

textbox

qt

I'm new to Qt, and just want to ask. What should I use to make a text box?

Thanks.

like image 411
Simplicity Avatar asked Apr 08 '11 08:04

Simplicity


People also ask

How do I insert a textbox in Qt?

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.

How do you use text browser QT?

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.

What do you call the boxes where you input text?

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.

What is Qtwidgets?

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.


2 Answers

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.

like image 100
neurino Avatar answered Sep 21 '22 17:09

neurino


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

like image 36
Gowtham Avatar answered Sep 21 '22 17:09

Gowtham