Results 1 to 8 of 8

Thread: [QT3] Implement "Freeze Panes" features in QListView

  1. #1
    Join Date
    Dec 2008
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default [QT3] Implement "Freeze Panes" features in QListView

    Hello!

    I'm using QT 3.3.5 (and I can't change). I need to implement the "freeze panes" features in a QListView. In other word :
    The first column is always visible when you scroll horizontally.

    Does somebody has a little hack to make it possible?

    Thanks in Advance,

    Syphius.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: [QT3] Implement "Freeze Panes" features in QListView

    There is no hack. Put another list view (or a listbox) on the form next to the original one, make it display a single column and synchronize vertical scrollbars of both widgets.

  3. #3
    Join Date
    Dec 2008
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: [QT3] Implement "Freeze Panes" features in QListView

    Thanks for reply.

    But I need one big horizontal scrollbar for the two widgets, How can I do that?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: [QT3] Implement "Freeze Panes" features in QListView

    What for? You won't be able to scroll the first view anyway, right? You can always disable scrollbar in the listview and then place another scrollbar beneath the view and synchronize the view's scrollbar with it (and vice versa).

  5. #5
    Join Date
    Dec 2008
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: [QT3] Implement "Freeze Panes" features in QListView

    Good idea, but no signal is emitted or event processed when scrollbar is always off. I test it, and I look in the code.

    Moreover in QT3 there isn't lots of signals emitted by the scrollbar, two scrollbar can't be synchronise.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: [QT3] Implement "Freeze Panes" features in QListView

    I'm sure valueChanged() is emitted by the scrollbar regardless of its visibility. There is also contentsMoving() signal in QScrollView.

  7. #7
    Join Date
    Dec 2008
    Posts
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: [QT3] Implement "Freeze Panes" features in QListView

    The valueChanged signal is only emitted when the scrollbar is visible. And I want something that hide and show automaticly like the normal scroll and its min and max value must change too with the size of the list view.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    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: [QT3] Implement "Freeze Panes" features in QListView

    Quote Originally Posted by Syphius View Post
    The valueChanged signal is only emitted when the scrollbar is visible.
    That's clearly a bug then. Are you using the latest release? Maybe it was fixed in 3.3.8? Maybe you could even patch Qt yourself so that the signal is emitted, it should be easy...

    And I want something that hide and show automaticly like the normal scroll and its min and max value must change too with the size of the list view.
    I'm sure there is a way to do it.

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.