Results 1 to 6 of 6

Thread: QScrollArea

  1. #1
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Red face QScrollArea

    I have a QScrollArea and when I click on the Vertical scroll bar to scroll the window down, the scroll bar redraws in the new spot but doesn't erase the old bar. If I click in the trough 2-3 times to scroll down 2-3 pages, and then scroll back up, all the previous scroll bars erase leaving the new one and the one in the spot right before it. Then if I keep clicking up, I fill the trough up with more bars. Then click below the bar in the trough and it erases all the old scroll bars. I am guessing this is some code I have causing this, but has anyone else experienced this problem. I am using Qt 4.3.0. I am capturing valueChanged( ) rangeChanged( ) and actionTriggered( ) for the scroll bar, but I have commented these connect calls out and I am still getting the problem. Thanks for any ideas you may have!

  2. #2
    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: QScrollArea

    Quote Originally Posted by ToddAtWSU View Post
    I am guessing this is some code I have causing this
    Don't guess but write a simple test application to see.
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QScrollArea

    What is something simple I can put inside a QScrollArea to test this out with? I was having problems figuring out what to put inside it. I didn't want to put the same thing I had in the current project in case this was causing the problem. I didn't write the original code with the QScrollArea and I was having problems trying to figure out what I could put inside that was bigger than the QScrollArea so I would have to attempt to scroll. Thanks!

    Edit: Nevermind, I found the example in the Docs and realized I could do this with an image I have, so I will attempt this example and see what happens.

  4. #4
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QScrollArea

    So I have played around with it and I have narrowed the problem down to one area. It seems to be dealing with the QDesktopWidget stuff. I am working on a Sun box running Solaris 9. I have 4 monitors, each with its own desktop and graphics card, and whenever the QScrollArea is on monitors 1-3, this stuff acts up. If the QScrollArea opens on monitor 0, then it behaves like normal. I am going to look into our usage of QDesktopWidgets but does anybody know of any problems using these with QScrollAreas? Thanks!

  5. #5
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QScrollArea

    I have played around with the application and the QScrollArea works fine when I tell the window containing the QScrollArea to open on the primaryWindow( ), but if I open it on one of the 3 secondary windows, then it doesn't work. Any ideas? Thanks!

  6. #6
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Thanks
    37
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QScrollArea

    Well, I found a work-around to this problem. I capture the valueChanged signal that the scroll bars emit and after I do what I need to do when the value of the scroll bar changes, I call repaint( ) on the scroll bar and this fixes the problem. Calling update( ) to do a graceful redraw would not work, but doing the repaint( ) did work. So I have found a work-around for this bug.

Similar Threads

  1. QScrollArea
    By sabeesh in forum Qt Programming
    Replies: 7
    Last Post: 2nd November 2007, 10:33
  2. QScrollArea and resizing
    By rarefluid in forum Qt Programming
    Replies: 8
    Last Post: 22nd July 2007, 14:18
  3. QScrollArea With Custom Widgets
    By VireX in forum Qt Programming
    Replies: 30
    Last Post: 22nd April 2007, 16:48
  4. Replies: 2
    Last Post: 8th October 2006, 20:14
  5. is there any signal for QScrollArea?
    By rajesh in forum Qt Programming
    Replies: 1
    Last Post: 21st July 2006, 07:12

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.