How to change DzImageMenu's fileselect dialog extension list?
LpProject
Posts: 41
Hi.
Is it possible to change file's extension list in DzImageMenu
like this
Images(*.hdr,*.exp,*.tif)
P.S.
I know DzImageMenu by default support this formats. But I need to Filter Default format and show only those that I want.
Thanks.
Comments
DzImageMenu does not [currently] provide a way to limit which file extensions are displayed in its list.
To do as you indicate, at the moment, you would need to implement your own QPushButton subclass that dynamically built a popup QMenu, using connections to the QMenu::aboutToShow() and QMenu::triggered() signals. Prior to showing the menu, you would need to query DzImageMgr and iterate over the images, inserting only those that met your criteria. Then, when triggered, you would need to retrieve the associated image/texture and assign it Obviously, there is quite a bit I'm not saying that would need to happen if you wanted to replicate the look and feel of DzImageMenu.
-Rob
About implementation my own QPushButton subclass I can do, but it dont have same look as DzImageMenu class.
Can you give me some examples, how I can get DzImageMenu look, in my own QPushButton subclass, mainly for icon