Results 1 to 2 of 2

Thread: Adding widgets after setupUi is called

  1. #1
    Join Date
    Dec 2010
    Qt products

    Question Adding widgets after setupUi is called

    Hey there,

    I have a custom subclassed widget that I want to add to a window I created with Qt Designer. However, there doesn't seem to be a way to do that without creating a new layout and thereby replacing entirely the Qt Designer one. Does anyone know how I might go about doing this?

    Thanks so much,

  2. #2
    Join Date
    Mar 2009
    Brisbane, Australia
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Unix/X11 Windows
    Wiki edits

    Default Re: Adding widgets after setupUi is called

    You can access the existing layout(s) through the ui object that Designer created for you. Once you have that you can addWidget() or insertWidget() as needed.

Similar Threads

  1. Adding widgets to QScrollArea
    By ser_bur in forum Qt Programming
    Replies: 6
    Last Post: 19th August 2013, 11:38
  2. Replies: 5
    Last Post: 19th April 2010, 00:31
  3. Adding widgets in Designer
    By franco.amato in forum Newbie
    Replies: 3
    Last Post: 21st December 2009, 14:43
  4. Adding more tab widgets
    By rakkar in forum Newbie
    Replies: 2
    Last Post: 10th September 2009, 22:22
  5. Adding widgets dynamically
    By miw in forum Qt Programming
    Replies: 1
    Last Post: 23rd July 2009, 11:31

Tags for this Thread


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.