Results 1 to 2 of 2

Thread: Designer plugin with container widget

  1. #1
    Join Date
    Apr 2020
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Designer plugin with container widget

    Hi All,

    I am struggling with creating a new Designer widget, with a container in it for Qt 5.14.1. I am following tutorials and some other leads to get this working and I actually have my widget in Qt designer. My widget derives from QWidget, have some layouts, a frame and a label in it. And also a QWidget intended to be a container for other widgets from the designer.

    My problem is, how do I specify the container widget for the Designer?

    I am trying to solve this with QDesignerContainerExtension (although the documentation is stating that it is not meant for this), as most forum posts are pointing to that direction (but never with a working example). I am forcing it to have 1 page and for that page I return my container widget back.

    The widget appears in the designer, but when I drag an other widget into it, like a button, the button is not placed into the container widget, it actually not even appears in the widget tree. It seems the button is attached to the custom widget, but not to the container. Also I can't seem to be able to specify a layout for it.

    Here is what I have now: RibbonWidgets.zip

    Can you please help me making this work?

    Thank you.

    Laci

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Designer plugin with container widget

    You can download code for wwWidgets here: http://www.wysota.eu.org/wwwidgets/#download

    It contains a couple of working containers. I'm not maintaining it anymore but the code that is there should still work.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Apply Layout to custom widget plugin container
    By Alex87 in forum Qt Programming
    Replies: 7
    Last Post: 28th July 2014, 13:57
  2. Replies: 1
    Last Post: 23rd June 2011, 23:09
  3. Replies: 4
    Last Post: 27th October 2010, 16:43
  4. Custom Container widget plugin help needed
    By JohnKustrin in forum Newbie
    Replies: 1
    Last Post: 14th May 2010, 10:01
  5. Replies: 4
    Last Post: 9th August 2007, 08:20

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.