Results 1 to 3 of 3

Thread: Adding widgets to layout dynamically

  1. #1
    Join Date
    Feb 2014
    Posts
    60
    Thanks
    4
    Thanked 5 Times in 5 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Adding widgets to layout dynamically

    hi,
    I am working on creating an application that looks and works like qt designer.I am having this strange feeling of how widgets are added to layout when i drag and drop on it.I know we can use custom class
    to create all widgets but QLayout is not a QWidget so how do i handle it.So far i have come up with drag and drop all other widgets but when it comes to layout i don't know how to proceed.

    thanks,

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,734
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Adding widgets to layout dynamically

    Custom widget plugins for Qt Designer have an interface function, isContainer(), that tells Designer the widget can contain others. Designer creates and manages layouts for widgets that are containers. Perhaps you should look at how it keeps track of those.

  3. #3
    Join Date
    Feb 2014
    Posts
    60
    Thanks
    4
    Thanked 5 Times in 5 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Adding widgets to layout dynamically

    Thanks for your reply. I understood to add a custom plugin to Qt Designer we use QDesignerCustomWidgetInterface. But the problem is I am creating custom Designer Form similar as QtDesigner Form where we drag and drop widgets(PushButton,RadioButton,Vertical Layout etc.) so In my application i am not able to implement Layouts similar as QtDesigner Form as shown in Attached Image below like adding widgets to layout and it should change according to layout.
    I Dont know how to proceed.
    Attachment 10364

Similar Threads

  1. Adding Separate Widgets into Layout
    By ashboi in forum Qt Programming
    Replies: 6
    Last Post: 28th May 2012, 05:46
  2. Replies: 6
    Last Post: 23rd August 2010, 18:56
  3. Replies: 5
    Last Post: 19th April 2010, 00:31
  4. Adding widgets dynamically
    By miw in forum Qt Programming
    Replies: 1
    Last Post: 23rd July 2009, 11:31
  5. Adding/removing widgets dynamically...
    By ReilenBlaeyze in forum Newbie
    Replies: 2
    Last Post: 16th February 2006, 11:55

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.