| Trolltech Home | Qt4-preview-feedback Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 1 | |
when laying out a QComboBox, the following 2 constants also apply although (from my understanding) they should only aply to QPushButtons and similar (according to the documentation as well) QStyle::PE_PanelButtonCommand QStyle::CT_PushButton to see that those apply as well, use the ArthurStyle from the demos and apply it to a widget with a combobox -> first the Q_ASSERT(pushButton) in line 108 will alert and -> you can see that the QComboBox also uses the size set by line 355 strangly though an element with QStyle::CT_ComboBox seams to be there as well in a different call of sizeFromContents() (at least I get a hit when I add such a 'case' with a qDebug() output there) I haven't done much with custom styles yet so my understanding of this area might be limited but from the documentation I figured that they should not apply to comboboxes
Attachment:
Attachment:
signature.asc
Description: This is a digitally signed message part.
Message 2 in thread
Primitive elements such as PE_PanelButtonCommand are intended to be reused
by
other style elements as is done by arthur style. This way the style does not
have to
repeat code for every single control that contains a button. You can still
reimplement
CC_ComboBox yourself to have complete control but it is likely that the
implementation
you inherit will rely on other primitives.
I'm not sure what you are seeing with the size hint but CT_ComboBox is the
one actually
used by QComboBox itself. However a style can of course implement it to rely
on
CT_PushButton. For instance to ensure that it has room for a normal button
inside it.
Note that ArthurStyle was written and tested only for use with our own demos
and it is quite likely that you have to modify it heavily if you want to use
it with
other widgets. You should perhaps have a look at the styles example for a
more general
introduction into how you make pluggable styles.
--
[ signature omitted ]