Daniel Sorichetti
Daniel Sorichetti

Reputation: 1951

Custom UIs in C++ with Qt?

Coming from C#, I've decided to learn C++ with the Qt framework. I have one question though, what is the "correct" way to accomplish an UI like this one? This may be kind of subjective, but I'm sure that stacking image labels on top of each other isn't the right way.

browser mockup http://img685.imageshack.us/img685/7643/mockup.png

Upvotes: 4

Views: 1091

Answers (3)

CMircea
CMircea

Reputation: 3568

The top part is a toolbar. You can use a QMainWindow with a QToolBar, where you put several QToolButton's. You can then use a stylesheet to get that nice look.

Upvotes: 4

You could also create your own QStyle, which is responsible for actual drawing of widgets.

Upvotes: 1

e8johan
e8johan

Reputation: 2939

I'd recommend creating a plain old standard UI first, then to apply a stylesheet to it to achieve the required look. That way, you can concentrate on the functionality that you want (a QToolBar with buttons and a QLineEdit) and just do all the styling afterwards (or first).

Upvotes: 9

Related Questions