Andre Poenitz a écrit :
On Thu, Apr 27, 2006 at 12:37:45PM +0200, Abdelrazak Younes wrote:
I just had an interesting journey in QFileDialog implementation. The functionality is all there but it's all private :-(
It looks very easy to add any button we'd like there.

Another option would be to create our own dialog using QDirModel.
There are basically 3 solutions:

1) hack QFileDialog and use it until the functionality appear in Qt4.2 or Qt4.3. This seems very easy to do (just make addWidget() protected instead of private or just add the buttons in setupToolButtons()).

2) stay with Q3FileDialog and just use addToolButton. Minimal change, minimal risk, and we postpone the porting to QFileDialog unti Qt4.2.

3) Create our own widget using QDirModel. Maximum risk, maximum change, but way more interesting!

4) Extend QFileDialog without hacking. Just create the beast, hunt
through the list of child widgets and layouts until you find something
appropriate, and add a new button as child widget there.

I'd say this is a hack also because you don't know how the list of child widget will evolve in future release or am I missing something? I'd say it's workable yes. \reminds me of the property based Matlab GUI programming. Quite efficient once you know what you are doing but you always need to look deeper and deeper for whatever property you want to change.

Abdel.



Andre'


Reply via email to