Results 1 to 4 of 4

Thread: QTreeWidget scroll only one column

  1. #1
    Join Date
    Jul 2008
    Posts
    26
    Qt products
    Qt4
    Platforms
    Windows

    Question QTreeWidget scroll only one column

    Dear all,

    I'm wandering if there's a way to set a scroll bar only for a column of a QTreeWidget.
    Actually I have a QTreeWidget with two columns I would like to set (if necessary) a scroll bar only for the first column.

    Thank a lot

    =)

    Annalisa

  2. #2
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTreeWidget scroll only one column

    Hi,

    What about implementing custom "middle/center" button behavior and update your treeWidget the way you want it ?

    Does this idea help you?

    Kacper
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  3. #3
    Join Date
    Jul 2008
    Posts
    26
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTreeWidget scroll only one column

    Thanks for you replay!

    I think I don't understand clearly what you mean...
    I have to add a button to my interface? What do you mean with "custom middle button behavoir"

    ...Sorry but it's my first time with Qt and I'm getting mad!

    Thanks a lot

    Annalisa

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QTreeWidget scroll only one column

    The easiest way to do it is to construct two separate QTreeWidgets and put them right next to each other. Make one scrollable and the another not.
    J-P Nurmi

Similar Threads

  1. Sorting column in QTreeWidget
    By lni in forum Qt Programming
    Replies: 8
    Last Post: 14th November 2007, 18:35
  2. setting data of buffer to QTreeWidget column
    By thomasjoy in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2007, 17:12
  3. QTreeWidget item editing: want column specificity
    By McKee in forum Qt Programming
    Replies: 12
    Last Post: 10th December 2006, 22:12
  4. Replies: 1
    Last Post: 21st September 2006, 10:37
  5. Change column width in a QTreeWidget
    By mace in forum Qt Programming
    Replies: 2
    Last Post: 27th May 2006, 12:19

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.