But it doesn't mean it can't be used this way. If you wanted to provide support for that in Designer, it would need to handle such a situation as well.
No. Before Qt4 Designer was a tool that was able to do many more things than just lay out widgets. But then Trolls decided to make Designer only a layout editor which can be embedded into real IDEs.Perhaps because noone seriously though about it how to improve it and to make it better beyond pure layout design?
I agree but I don't think Designer should be the tool.But if the compiler or some tool can help prevent bugs like that in the first place, it should be used.
...based on the name. That's exactly what qFindChild does.But this is only a small part of what I want. And it handles a concrete object. My idea was not to find a concrete child, but a certain node in a tree.
Resources are compiled into the binary and occupy the memory all the time.I am not sure about that. The QDesignerObject tree, which, according to my proposal, in the designer should be created like a layout tree, would have to be kept in the resources.
Hmm... so how do you want to access the data from code if it is only to be available to the automated code? Or maybe I don't understand what you mean by "gui creation" - for me setupUi() does that.Once the gui is created, this info could be unloaded/deleted. I would have a small influence on the gui creation, but none on object deletion.
So it does the same qFindChildren() does, only on the separate object hierarchy, right?When you call my getDesignerObject method with the parameter "group_1", it creates a container object, for the sake of the example, suppose it is a simple QList<QObject *>. Then it traverses the above mentioned QDesignerObject tree, which is an XML structure, and adds all object pointers, which belong to the "group_1" branch to the list.
Finally it returns a pointer to this list.
But then you could only use it in a class generated by Designer.This is just an example, that this could be added without changing QObject. The QDesignerObject would also be only a temporary transfer object to pass their content around.
According to me the thing you want is a nice candidate for a completely separate component that can be implemented using Qt but not necessarily inside Qt.






Reply With Quote

Bookmarks