This is a great way to click your gui together with Designer and still be able to add functionality, such as drag and drop. Now the question is, how to add a layout as well?
I used the same approach and created a QFrame in Designer which I then promoted to MyFrame. MyFrame is able to handle drop events. The dropped objects should be layed out nicely though, so I hoped I can take care of the layout in Designer too. I added a horizontal layout in Designer to the QFrame, promoted it to MyFrame and started the application. I dragged something on the frame and boom, the application crashed. Investigations show that myFrame->layout() returns NULL. The layout has been canceled. It doesn't matter if I first promote and then add the layout either.
Any ideas how to accomplish this?
Bookmarks