Results 1 to 2 of 2

Thread: show full content QDockWidget with QScrollArea

  1. #1
    Join Date
    Feb 2017
    Posts
    7
    Thanks
    4
    Qt products
    Qt5
    Platforms
    Windows

    Question show full content QDockWidget with QScrollArea

    Hello.
    I have a floating QDockWidget that hold a QWidget (QDockWidget::setWidget(QWidget * widget).
    This QWidget hold a QToolBar and a QScrollArea grouped into a QVBoxLayout.

    I want to resize QDockWidget to show full content.
    For this I need that QScrollArea show full content too, without needing scroolbars.
    How can I do that?

    Qt Code:
    1. +------------------------+
    2. | +-------------------+ |
    3. | | QWidget | |
    4. | | QVBoxLayout | |
    5. | | QToolBar | |
    6. | | +-------------+ | |
    7. | | | QScrollArea | | |
    8. | | | +---------+ | | |
    9. | | | | QWidget | | | |
    10. | | | +---------+ | | |
    11. | | +-------------+ | |
    12. | | | |
    13. | +-------------------+ |
    14. +------------------------+
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: show full content QDockWidget with QScrollArea

    Quote Originally Posted by junior-root View Post
    ...For this I need that QScrollArea show full content too, without needing scroolbars....
    Then don't QScrollArea at all, just put QToolBar and QWidget in QVBoxLayout.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

Similar Threads

  1. QTreeWidget / QListView show full name under cursor
    By Alundra in forum Qt Programming
    Replies: 0
    Last Post: 17th June 2014, 04:34
  2. Replies: 2
    Last Post: 6th September 2013, 05:13
  3. Replies: 1
    Last Post: 11th June 2010, 09:47
  4. QScrollArea - content strech,scale
    By kemp in forum Qt Programming
    Replies: 2
    Last Post: 18th January 2007, 18:15

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
  •  
Qt is a trademark of The Qt Company.