Results 1 to 5 of 5

Thread: QToolBox

  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default QToolBox

    Hi,
    I designed my application with a toolBox on the right(from QT Designer). But now, I'd like
    to change his dimension from mainForm.ui.h. I tried myToolbox->setGeometry(0,0,50,100) but the position and dimensions don't change. Is it possible to do this?
    Thanks.
    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    India
    Posts
    115
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QToolBox

    Have you used QLayout for layout?
    If yes, it is very difficult, if not impossible, for setting geometry.
    If no, try using move(0, 0) & resize(50, 100).

    More detail is needed for further thoughts, hope this helps.

  3. #3
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: QToolBox

    (I insert myToolBox by QTDesigner. I selected it from toolbox of qt designer. It insert in a QHBoxLayout).
    I try toollBox->move (0,0) but don't move it! 'resize' don't resize.
    Any hints? (But is it possible?)
    Thanks.
    Regards

  4. #4
    Join Date
    Jan 2006
    Location
    India
    Posts
    115
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QToolBox

    Quote Originally Posted by mickey
    (I insert myToolBox by QTDesigner. I selected it from toolbox of qt designer. It insert in a QHBoxLayout).
    I try toollBox->move (0,0) but don't move it! 'resize' don't resize.
    Any hints? (But is it possible?)
    When you use QLayout (derivatives) all layout of all widgets in parent widget is managed by that instance (in your case it is QHBoxLayout). So as i mentioned earlier in my other post move is impossible as long as you are using a QLayout, as for resize, you may try to setMaximumSize() to see if it works. There may be more tricks but they are unknown to me.

    Secondly, you can be part with QHBoxLayout and position & resize each item manually.

  5. #5
    Join Date
    Jan 2006
    Location
    India
    Posts
    115
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QToolBox

    You can also use QHBoxLayout::setMargin(0)

Similar Threads

  1. QToolBox Resizing to contents??
    By kerwim in forum Qt Programming
    Replies: 1
    Last Post: 30th June 2008, 09:28
  2. QToolBox + resize + hide
    By eleanor in forum Newbie
    Replies: 14
    Last Post: 24th October 2007, 20:41
  3. QMainWindow && QToolBox
    By eleanor in forum Qt Programming
    Replies: 1
    Last Post: 21st October 2007, 21:11
  4. QToolBox qss style sheet problem
    By eskil in forum Qt Programming
    Replies: 1
    Last Post: 17th August 2007, 18:45
  5. Custom Qtoolbox : some problems
    By dr23 in forum Qt Programming
    Replies: 1
    Last Post: 6th January 2006, 14:01

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.