Solved Designing custom widget in Designer
-
I need to design a custom widget which has quite a complex arrangement of line edits and push buttons. Therefore, I'm trying to avoid doing it programatically. Is there a way I can use Designer to layout my widget?
-
@EaccB said in Designing custom widget in Designer:
Is there a way I can use Designer to layout my widget?
Yes - it's the same as you design a normal dialog / widget.
-
How would I then "save" that into a custom widget?
-
@EaccB said in Designing custom widget in Designer:
How would I then "save" that into a custom widget?
I don't understand.
A custom widget is a normal widget - nothing more. If you want a custom widget in the designer you have to create a designer plugin: https://doc.qt.io/qt-5/designer-using-custom-widgets.html -
I mean if I layout the line edits and buttons in Designer, how can I combine them into a custom widget?
-
@EaccB said in Designing custom widget in Designer:
how can I combine them into a custom widget?
The same way as you do it with a 'normal' widget: https://doc.qt.io/qt-5/designer-using-a-ui-file.html
-
Thanks that's worked!
-
@EaccB said in Designing custom widget in Designer:
Thanks that's worked!
great, so please don't forget to mark your post as solved then!