Results 1 to 3 of 3

Thread: How can QTreeWidget force window to resize.

  1. #1
    Join Date
    May 2012
    Posts
    4
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How can QTreeWidget force window to resize.

    Hello,

    I'm working on a simple music player, and I can't deal with resizing. Namely, I have main window, in which I have QTreeWidget. Now, once I load some kind of data into that tree, it grows both horizontally and vertically. The problem is, that I want to force main window to resize itself each time I load data, so the window can present whole data horizontally (vertically not necessary). I just don't want to scroll on sides, just up and down.
    I've been googling for this for quite some time now, and didn't find solution to my problem. Thanks in advance for help ; )

  2. #2
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 26 Times in 23 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: How can QTreeWidget force window to resize.

    you may try to manually resize main window when loading data.

  3. #3
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: How can QTreeWidget force window to resize.

    Hi,

    I got a bit confused about your question. I mean you mentioned about resizing the main window but then said something about scroll bars.

    I assume you don't want to resize the widget. If so you don't want to scroll the widget on sides? But if so, your one raw data may shrink to 2nd line?


    Added after 12 minutes:


    By the way, I suppose you need to use QTableWidget?
    Last edited by zgulser; 4th May 2012 at 09:36.

Similar Threads

  1. To resize CheckBox in QTreeWidget using QStyle?
    By merry in forum Qt Programming
    Replies: 0
    Last Post: 25th May 2011, 08:26
  2. Resize Row Hieght in QTreeWidget
    By photo_tom in forum Qt Programming
    Replies: 0
    Last Post: 24th May 2010, 16:42
  3. Window focus issues (How to force focus to a window?)
    By montylee in forum Qt Programming
    Replies: 3
    Last Post: 25th April 2009, 02:00
  4. Resize widget force layout resizing
    By ^NyAw^ in forum Qt Programming
    Replies: 17
    Last Post: 11th February 2009, 12:27
  5. Resize QTreeWidget columns to contents
    By FaS in forum Qt Programming
    Replies: 9
    Last Post: 2nd July 2006, 21:48

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.