Control of UI Design in QT
-
QT is a very powerful tool for creating UI's and that is why I am using it. But I am having trouble designing the look of the interface. My vision is to have it look something like blender,
http://www.katsbits.com/images/tutorials/blender-layout/de-select-load-ui-opening-file.jpgSo I obviously am trying to make it a little like that. Is their any suggestions to enhance the look in the UI?
-
I suggest to work with styleSheets which give you control of the design and you should be able to make a blenderlike UI.
Here's a small sample for a pushButton, assigned in the form to a QFrame with some buttons through Creator:@
QPushButton {
font: 7pt "Ubuntu";
border-width: 1px;
border-color: #87c3ff;
border-style: solid;
border-radius: 2;
min-width: 55px;
min-height: 15px;
}
QPushButton:hover {
border-color: orchid;
border-width: 2px;
}
QPushButton:pressed {
padding-left: 2px;
padding-top: 2px;
background-color: orchid;
}@
-
Is it possible to place all the style sheets in one file and have the rest of my program check that file when rendering widgets?
-
that should be possible as you can assign strings containing the stylesheets in runtime by using setStyleSheet