Results 1 to 12 of 12

Thread: Custom widgets in layout

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2009
    Location
    Czech Republic
    Posts
    26
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Custom widgets in layout

    Hi... I have class called EncrypterBody its parent is QWidget and It contains widgets like QPushButton, QTextEdit, etc defined in its constructor as well as its its own layout. Now I want have two objects of EncrypterBody class been shown in one window one under the other.

    Something like this
    Qt Code:
    1. --------------------------------------
    2. | |
    3. --------------------------------------
    4. | |---------|
    5. | |---------|
    6. | |---------|
    7. | | |
    8. -------------------------------------|
    9. --------------------------------------
    10. | |
    11. --------------------------------------
    12. | |---------|
    13. | |---------|
    14. | |---------|
    15. | | |
    16. -------------------------------------|
    To copy to clipboard, switch view to plain text mode 

    I also tried to make class "layout" (which parent was QVBoxLayout) in which constructor I created two instances of EncrypterBody and then I tried to add them to the layout via addWidget.

    I can easily manage to show two objects of EncryterBody in two separated windows, but to show them in one seems to be too hard for newbie of my caliber :P
    Attached Files Attached Files

Similar Threads

  1. Replies: 2
    Last Post: 16th May 2008, 14:39
  2. resizing events of a custom widget in a layout
    By Rooster in forum Qt Programming
    Replies: 7
    Last Post: 16th February 2008, 10:52
  3. picking geometry in qt custom widgets
    By notsonerdysunny in forum Qt Programming
    Replies: 2
    Last Post: 17th July 2007, 23:01
  4. Promoted widgets and layout boxes
    By notsonerdysunny in forum Qt Tools
    Replies: 3
    Last Post: 2nd May 2007, 14:15
  5. Custom plugin for a layout
    By cocheci in forum Qt Tools
    Replies: 2
    Last Post: 12th June 2006, 18: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.