Aham
Aham

Reputation: 49

Qt desktop application

The Qt desktop application I am required to develop has the following GUI:

The application window is split into 3 parts - left-side window - has a stack of clickable menu items one below the other. Clicking on each item will show up the corresponding UI elements on the prominent right-side window which is much bigger.

right-side window - contains UI to display some data depending on which menu item is clicked on the left-side window. Each left-side window menu item has a different corresponding right-side window UI.

top (header) window - contains some company "brand" related graphics and also a panel to select a serial port from a list along with graphics to represent connect/disconnect status.

How do I develop this kind of UI? What Qt classes should I be using? I'm a beginner to Qt and would deeply appreciate any help. Thank you.

Upvotes: 0

Views: 216

Answers (1)

goug
goug

Reputation: 2444

I'd suggest starting in Qt Designer or Qt Creator to create your UI by dragging and dropping different kinds of objects. Qt Designer is a standalone form designer where Qt Creator is full development environment that also includes the functionality of Qt Designer. Using the form designer is a lot easier, particularly when starting out, than creating widgets programmatically.

There's multiple ways to do the list of items on the left. You can use a QListWidget or a series of individual QPushButton instances, one per option. If the list of items changes, then managing the QListWidget content is going to be easier than instantiating a QPushButton for each item, but you might like the appearance of the QPushButton better. It just depends on what you want.

For the right side, look into QStackedWidget. It's specifically designed to display a stack of content where only one item is available at a time.

For the top panel, again, use the form designer to create the layout. You can store an image in a QLabel. A QComboBox might be what you want for the list, or again, you may want a QListWidget. It just depends on what appearance and user experience you're looking for. For the connect/disconnect status, you can use a QLabel and change out the graphics as the status changes.

You'll need to learn about slots and signals; those are crucial to anything Qt-related.

Upvotes: 1

Related Questions