Results 1 to 2 of 2

Thread: Instance a collection of Widgets in Qt Designer without using copy/paste

  1. #1
    Join Date
    Jun 2012
    Posts
    219
    Thanks
    28
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Instance a collection of Widgets in Qt Designer without using copy/paste

    I have a buttonGroup that contains several (6 - 10) buttons, complete with icons and tool tips. The group also includes a spin-box and label.

    I want a widget with four of these groups, and up to two extra columns of the same group that sometimes get created dynamically.

    I can get the four "instances" of the group in Qt Designer easily using copy/paste. But, I have to make any required changes on all four instances.

    I read about integrating custom widgets into Qt designer. I suppose that will work, but it seems a bit complicated. Is there an easier or better way?

    Thanks,

    Dave Thomas

  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: Instance a collection of Widgets in Qt Designer without using copy/paste

    You can replace those widgets in Designer by placing a plain QWidget in the form, right-clicking it and promoting it to the class you implement elsewhere (code/Designer) that contains the real set of widgets. UIC will then replace calls to QWidget on the promoted entries with calls to your class.
    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. QGraphicsView Copy and Paste
    By stevel in forum Qt Programming
    Replies: 14
    Last Post: 13th January 2014, 07:57
  2. copy and paste
    By hubipet in forum Qt Tools
    Replies: 1
    Last Post: 17th July 2009, 06:19
  3. Copy-Paste files
    By Lele in forum Qt Programming
    Replies: 11
    Last Post: 4th April 2008, 14:15
  4. using cut(), copy(), paste()
    By systemz89 in forum Newbie
    Replies: 5
    Last Post: 18th December 2007, 14:47
  5. Copy/Paste in TableView
    By bronte in forum Qt Programming
    Replies: 2
    Last Post: 10th September 2006, 21:36

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.