Re: QColorDialog Apperance?
You can't modify the appearance of such a widget. the only way to get a different color dialog that fit your needs is to craft your own from more basic components (widgets) and maybe looking at the source to see how the color stuff are handled
Good luck.
BTW I'm looking for a color combobox widget to use in a Qt app, anyone has clue?
Re: QColorDialog Apperance?
It is possible to change them, at least it should be. One way is to use i18n mechanisms integrated with Qt (QTranslator and stuff), another is to look at the dialog's sources to find names of those widgets you need and then ask the dialog to return a pointer to a named child using QObject::findChildren() and when you have them, you can alter them the way you want.
Re: QColorDialog Apperance?
Quote:
Originally Posted by wysota
another is to look at the dialog's sources to find names of those widgets you need and then ask the dialog to return a pointer to a named child using
QObject::findChildren() and when you have them, you can alter them the way you want.
QColorDialog has only static methods (and a private constructor) so I'm afraid this is not possible.
Re: QColorDialog Apperance?
True. So only the translator solution is possible.
Re: QColorDialog Apperance?
The feature your want to achieve may be somehow achieved using the native platform code. Or at least it is possible to get inside the dialog and change something using the WinAPI code on Windows. If this suits your needs, you can poke around the CodeProject - there definetely was a nice example.
But anyway, I would rather use the Qt sources and implement my own color dialog basing on them.
Re: QColorDialog Apperance?
Quote:
Originally Posted by Lemming
But anyway, I would rather use the Qt sources and implement my own color dialog basing on them.
Yes I've done it.
I copied to my work directory the files
qcolordialog.cpp
qcolordialog.h
qdialog_p.h
created a subdirectory named private and copy there the files
qobject_p.h qwidget_p.h
after that I only need to change the qcolordialog.cpp source and everthing seems to be working fine.
I would have thought that it should be possible to change those thinks. The Qt developers didn't seem to agree with me, and complaining about a free thing is nonsense.
Many thanks,
Re: QColorDialog Apperance?
Quote:
Originally Posted by antonio.r.tome
I would have thought that it should be possible to change those thinks. The Qt developers didn't seem to agree with me, and complaining about a free thing is nonsense.
Many thanks,
Why did you need to change it anyway?
Re: QColorDialog Apperance?
Quote:
Originally Posted by Chicken Blood Machine
Why did you need to change it anyway?
I don't need it! I want it. I intend to use the custom color mecanism, and the facilities associated with it. Then I use the color dialog as a tool to choose a discret color patern table (user made) through the custom color mechanism.
So instead of "add to custom color" I want "accept as labels colors" and instead of "custom colors" I want "labels colors" and for the windows title I obviously want "labels colors". As you see nothing important. No extra functionality, only more user friendness.:)
best regards,
António Tomé
Re: QColorDialog Apperance?
You could still have used the i18n mechanism to avoid re-coding QColorDialog.
Oh, and about the "complaining about a free thing is nonsense" part, you can report bugs here:
http://www.trolltech.com/forms/feedbackform.html
It's just that this is not a bug, and Trolltech will probably not implement a new feature if you're the only one asking for it.