Results 1 to 13 of 13

Thread: How to resize the Items in FormLayout

  1. #1
    Join Date
    Oct 2009
    Posts
    105
    Thanked 4 Times in 2 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default How to resize the Items in FormLayout

    Hi ALl,
    I've a tabwidget and a MdiArea in a FormLayout. How to make it resizable. plz help.

    Thank u All.

  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: How to resize the Items in FormLayout

    Could you explain what you mean by "resizable"? And please don't tell me "to be able to change its size".
    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.


  3. #3
    Join Date
    Oct 2009
    Posts
    105
    Thanked 4 Times in 2 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to resize the Items in FormLayout

    Quote Originally Posted by wysota View Post
    Could you explain what you mean by "resizable"? And please don't tell me "to be able to change its size".
    Hi Wysota,
    I've attched the ui doc. As per the attached doc, MdiArea and tabWidget is attched to a formlayout. I want to make my tabwidget expandable, i.e if i increase the tabwidget, then mdiArea size should be decrease. How to do this.???
    Attached Files Attached Files

  4. #4
    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: How to resize the Items in FormLayout

    In my opinion you need a splitter, not a form layout.
    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.


  5. #5
    Join Date
    Oct 2009
    Posts
    105
    Thanked 4 Times in 2 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to resize the Items in FormLayout

    Quote Originally Posted by wysota View Post
    Could you explain what you mean by "resizable"? And please don't tell me "to be able to change its size".
    Quote Originally Posted by wysota View Post
    In my opinion you need a splitter, not a form layout.
    Hi
    I've no of push buttons in side a horizental lay out(Plz check the attched doc) .
    Inside constructor i did like
    Qt Code:
    1. QSplitter *split = new QSplitter(Qt::Horizontal, this);
    2. split->addWidget(ui->tabWidget);
    3. split->addWidget(ui->mdiArea);
    To copy to clipboard, switch view to plain text mode 

    But output is coming like the attched output.doc.
    output.doc
    Last edited by sudhansu; 3rd December 2009 at 13:17. Reason: correction

  6. #6
    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: How to resize the Items in FormLayout

    Please provide a minimal compilable example reproducing the problem. BTW. You remembered to place the splitter in a layout, right?
    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.


  7. #7
    Join Date
    Oct 2009
    Posts
    105
    Thanked 4 Times in 2 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to resize the Items in FormLayout

    Quote Originally Posted by wysota View Post
    Please provide a minimal compilable example reproducing the problem. BTW. You remembered to place the splitter in a layout, right?
    Hi i've attached the code. can u plz chk it.
    Attached Files Attached Files

  8. #8
    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: How to resize the Items in FormLayout

    The splitter should be instead of the layout, not floating around in the widget right next to the layout...
    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.


  9. #9
    Join Date
    Oct 2009
    Posts
    105
    Thanked 4 Times in 2 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to resize the Items in FormLayout

    Quote Originally Posted by wysota View Post
    The splitter should be instead of the layout, not floating around in the widget right next to the layout...
    Hi,
    Can u plz tell me how to do it.??? Is there any wy to add splitter through Designer?? I c'dnot find.
    Thank u.
    Last edited by sudhansu; 4th December 2009 at 04:40.

  10. #10
    Join Date
    Aug 2009
    Posts
    52
    Thanked 10 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to resize the Items in FormLayout

    Quote Originally Posted by sudhansu View Post
    Hi,
    Can u plz tell me how to do it.??? Is there any wy to add splitter through Designer?? I c'dnot find.
    Thank u.
    read qt manual

    http://qt.nokia.com/doc/4.6/designer-layouts.html

  11. #11
    Join Date
    Oct 2009
    Posts
    105
    Thanked 4 Times in 2 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to resize the Items in FormLayout

    Quote Originally Posted by dbzhang800 View Post
    Hi
    Thanks for reply. My question was , how to add spliter thru Qt designer. Coz, if i right click on my widget, layout vertical in spliter and layout horizental in spliter is disable. and in designer widget box i could not find the splitter.

  12. #12
    Join Date
    Aug 2009
    Posts
    52
    Thanked 10 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to resize the Items in FormLayout

    Quote Originally Posted by sudhansu View Post
    Hi
    Thanks for reply. My question was , how to add spliter thru Qt designer. Coz, if i right click on my widget, layout vertical in spliter and layout horizental in spliter is disable. and in designer widget box i could not find the splitter.
    Select two or more widgets, then spliter will be auto enabled.

  13. #13
    Join Date
    Oct 2009
    Posts
    105
    Thanked 4 Times in 2 Posts
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: How to resize the Items in FormLayout

    Quote Originally Posted by dbzhang800 View Post
    Select two or more widgets, then spliter will be auto enabled.
    Thank you very much.

Similar Threads

  1. Replies: 5
    Last Post: 27th November 2009, 13:57
  2. Some menubar items can not be clicked
    By richardander in forum Qt Programming
    Replies: 4
    Last Post: 11th March 2009, 00:26
  3. Light items for the graphicsView
    By maverick_pol in forum Qt Programming
    Replies: 12
    Last Post: 1st November 2007, 18:51
  4. Selective highlighting of Items
    By Kapil in forum Qt Programming
    Replies: 3
    Last Post: 26th May 2006, 12:20
  5. postponing resize event
    By Honestmath in forum Qt Programming
    Replies: 11
    Last Post: 26th February 2006, 00:32

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.