Two questions about QDialog
Unsolved
General and Desktop
-
- I have currently got code like this:
void DropFilesDlg::showEvent(QShowEvent* event) { if (!event->spontaneous()) { if (!initialised) { initialised = true; onInitDialog(); } } // Invoke base class showEvent() return Inherited::showEvent(event); }
which invokes an mf to setup the dialog
Should I instead be using onActivateWindow?
- If in that code (either onInitDialog or onActivateWindow) I decide that I don't actually want to display the dialog how can I do that?
Why - maybe we only accept files with extension .xyzzy and the user only dropped other filetypes...
Thanks
David -
@SGaist That sort of works for a file drag/drop ... not so much if a directory containing a mix of files is dropped.
If you know the answer to my first Q that would be great...
PS I've moved the drop processing to the code the invokes the dlg so the 2nd. issue is resolved.
Thanks
David -
@Perdrix do you mean your question about onActivateWindow ? The thing is that I don't know what that function does and when it is called.
As for folders, are folders allowed ? Should only a subset of files be processed ? That's again something you should manage on drop.