Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, April 2008
How to make custom property editor


Message 1 in thread

Hi Folks,

I am wondering whether it is possible to customize the property 
editor(s) for custom widget in Qt4 designer?

I have my custom widget with string property. What I am trying to 
achieve is similar to the default editor for enum based (Q_ENUMS) 
properties but with dynamic list of possible string values in the 
drop-down list. In my case I would like to generate the list of possible 
values dynamically every time the user clicks on the corresponding 
drop-down list in the property editor. Please note that it is not like 
QStringList-based property. I just want one string as a value, but would 
like to provide the user with the set of possible values.

Another example which is very close to what I want is the editor for 
windowIcon property. It content is populated dynamically based on what 
was selected in Find Icon dialog (popped up by pushing the button with 
folder).

The related question is - are there any examples available for creating 
custom dialogs for property editing (something like for example Edit 
Palette dialog for palette property)?

I did not find any mention about such possibilities and that is why 
would really appreciate any hints.


Thank you,
Andrey.

--
 [ signature omitted ]