[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] Native file dialogs. What to do?

From: Miguel de Benito Delgado
Subject: [Texmacs-dev] Native file dialogs. What to do?
Date: Mon, 8 Nov 2010 19:43:45 +0100


  as per Massimiliano's proposal, I'm switching the file dialog to a native one. No problem there, if one wants to open or save a document. Everything works out of the box, including drag&drop, which effectively makes my first contribution here obsolete. But, a dialog with an image preview is an altogether different matter, since this has to be custom made.

  QT's documentation states that native dialogs will only be used as long as one uses QFileDialog's static members and sticks to what they provide, which I duly do where I can. One may also subclass QFileDialog without calling Q_OBJECT, which effectively makes subclassing quite pointless as far as I'm concerned right now, since I'd like to add some widgets and connect some slots.

  Otherwise, the docs say no, no. Now, some peeking into QT's code reveals that it might be possible to hack around this limitation but quite conceivably that could break any time QT changes a tiny bit, and it definitely wouldn't work in Windows (if I understand those #ifdefs well)

  Yes, this is getting once again a tiresome tale, so to the point:

  Do we use native dialogs whenever possible and just have the one for opening images look different, i.e. QT'ish, or do we stick with the non-standard one all along? I thought another solution might be to add an external preview connected to the standard dialog, but then it's a static method and there's no way to connect the signals from the objects it creates. Another thing to keep in mind is that maybe this preview won't be necessary once images can be easily worked upon from within TeXmacs. 

  Or yet another, much more involved one: have the user select a folder for the images for a document, then allow him to browse it with a detachable window with thumbnails which he can simply drag&drop onto the canvas, then resize with handy-handles! Wouldn't that be nice? And with QT easy too! (ok, no more teasing)

Miguel de  Benito.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]