How about using Qt Designer component? Or if you feel this is beyond you, use Designer directly, only modifying the widget box. Then you can create widgets from Designer created forms on the fly.
How about using Qt Designer component? Or if you feel this is beyond you, use Designer directly, only modifying the widget box. Then you can create widgets from Designer created forms on the fly.
Hmm, that might be a possible solution.
Directly using the designer does not seem to be a suitable solution to me, as that would involve my end users using designer, which is unacceptable.
I don't really see how I could actually embed the designer though? I suppose that will involve switching to some sort of "editing mode" in my application, so the end user is still limited in his/her freedom as it would not be possible to resize/move widgets _really_ on the fly. Apart from that, wouldn't users have to bother with spacers and layouts and stuff in this case?
Was actually hoping there would be a more simple solution
As I'm thinking, wouldn't it be possible to create a class that inherits from QWidget and have that class provide resize/move functionality, after which I can subclass my custom widgets from this class?
Still, it will probably be quite some work to get such a class to behave correctly...
Okay, I've been looking around in the dragndrop examples. I've got an idea, but I would like some opinions.
Say I implement the drag 'n' drop kinda like in the puzzle example, but then with my own widgets. So I make some sort of grid (making it easy to predict possible overlap, and generally making it easier to create an "aligned" layout for the end user), in which the user may drop widgets.
Apart from that, I implement some way to resize the custom widgets.
I do this with a class subclassed from QFrame or QWidget, and I subclass my custom widgets from this class so every widget behaves the same.
Sounds like a plan?
You can do anything you're able to implement. I just suggested a solution where you don't have to implement anythingIt might prove quicker to train users to use layouts instead of implementing "Designer" from scratch.
I didn't completely disregard your reply wysota
Anyway, it seems to me that having users use designer to create their gui's is not a very versatile solution, as it won't really allow runtime editing.
I'll do a quickie on the drag n drop thing to see whether it is a feasible solutionMight post it here later as it might be helpful to others.
I do know that. Let me explain.
The application will be some sort of hardware control/data acquisiton control center. So you'll have plots and stuff. Using designer, embedded or not, the user can't really change his gui and still have the plots updating.
Correct me if I'm wrong![]()
You're wrong![]()
That's not much of a correction :P
Anyway, there doesn't happen to be an example of designer integration? I couldn't find anything other than the calculatorbuilder example, which isn't of much help.
There is an analog clock plugin example in Qt. You can see that it's active (the time passes) in Designer. As for the integration, you need to take a look at the designer component docs and you might also have a look at Edyuk sourcecode. As far as I remember it embedds a Designer component.
Bookmarks