O'Reilly logo

Qt 5 Projects by Marco Piccolino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding the List View, button, and line edit

What we want for our app is a list of characters to show up in the top part of the left column and a horizontal sequence of a button as well as a line edit to be displayed underneath it. Thus, we first add a new horizontal layout and then a List View (http://doc.qt.io/qt-5.9/qlistview.html) widget as children to the vertical layout we created before.

If you find it hard to drag a child component into a parent layout in the canvas, you can drag the component onto the parent layout's node in the object tree.

QListView corresponds in the widgets world to the ListView Qt Quick component we made use of in the previous chapters; it is a component based on the model/view paradigm, which automatically gets ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required