Results 1 to 1 of 1

Thread: Resizing of layout on adding a new graphicsview to the existing layout

  1. #1
    Join Date
    Sep 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Resizing of layout on adding a new graphicsview to the existing layout

    Hi,

    I am adding a new declarative component to the existing graphics view after clearing the previous declarative component.

    I am following the below steps:

    mHBoxTopLayout.addStretch(70);
    mHBoxTopLayout.addWidget(&mNumFilesIndicatorButton );

    mGraphicsScene.addItem(qmlComponent);
    mGraphicsView.setScene(&mGraphicsScene);
    mHBoxMiddleLayout.addWidget(&mQmlInfoLabel);
    mHBoxMiddleLayout.addWidget(&mGraphicsView);
    mVBoxLayout.addLayout(&mHBoxTopLayout);
    mVBoxLayout.addLayout(&mHBoxMiddleLayout);

    Next on click of a NumFilesButton, I need to change the qmlComponent which is of the different size.
    When i remove the item from the scene and add to graphics view, a scroll bar gets added in the view instead of the whole layout resizing.

    Attached is the actual qml files and the widget in which the qml files are added by using graphicsview.

    Do i need to delete the layout and recreate the layouts again or is there a mechanism to resize the layouts dynamically ?

    Thanks,
    Anupama
    Attached Images Attached Images

Similar Threads

  1. Adding custom widget to an existing layout
    By santana in forum Qt Programming
    Replies: 1
    Last Post: 22nd June 2010, 18:29
  2. Replies: 7
    Last Post: 15th June 2007, 17:13
  3. Replies: 2
    Last Post: 30th April 2007, 13:11
  4. Resizing problems when applying a layout
    By JimBrown in forum Newbie
    Replies: 1
    Last Post: 21st February 2007, 23:54
  5. Resizing a Layout
    By vvbkumar in forum Qt Programming
    Replies: 2
    Last Post: 21st June 2006, 09:02

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.