Results 1 to 5 of 5

Thread: QScrollbar bottom problem

  1. #1
    Join Date
    May 2013
    Posts
    321
    Thanks
    9
    Thanked 8 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Exclamation QScrollbar bottom problem

    Hi all,
    QScrollbar has one big issue :
    http://uppix.com/f-Scrollbar5390c4520016a883.png
    Look at the bottom of the scrollbar, you will understand.
    The bottom is on the border of the widget.
    I tried a lot of way to kill it, no one works.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QScrollbar bottom problem

    Explicit scrollbar? Scrollbar of a widget? Tried a different widget style?

    Cheers,
    _

  3. #3
    Join Date
    May 2013
    Posts
    321
    Thanks
    9
    Thanked 8 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QScrollbar bottom problem

    Without "App.setStyleSheet( StyleSheet );" I don't see the problem, you right.
    What is weird is I commented all the "QScrollbar" and "QAbstractScrollArea", the problem is there.
    I will add in a new stylesheet part by part and stop when the problem is there, surely the best here because my stylesheet = 932 lines.
    Last edited by Alundra; 5th June 2014 at 21:28.

  4. #4
    Join Date
    May 2013
    Posts
    321
    Thanks
    9
    Thanked 8 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QScrollbar bottom problem

    All works fine until I have :
    QAbstractItemView
    {
    alternate-background-color: #3A3939;
    color: silver;
    border: 1px solid #3A3939;
    border-radius: 3px;
    padding: 1px;
    }
    The problem is the same with only :
    QAbstractItemView
    {
    border: 1px solid #3A3939;
    }
    Hope you know a solution for that.

    EDIT:
    Apparently on the global stylesheet remove it is not enough.
    Here a screen who shows better the problem :
    http://uppix.com/f-Scrollbar53912e4f0016a965.png
    Last edited by Alundra; 6th June 2014 at 04:17.

  5. #5
    Join Date
    May 2013
    Posts
    321
    Thanks
    9
    Thanked 8 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QScrollbar bottom problem

    Here a minimal code that reproduces the bug of Qt :
    Qt Code:
    1. #include <QtWidgets//QApplication>
    2. #include <QtWidgets/QPlainTextEdit>
    3.  
    4. int main(int argc, char *argv[])
    5. {
    6. QApplication a(argc, argv);
    7. QPlainTextEdit e;
    8. e.insertPlainText("a\na\na\a\na\na\na\na\na\na\na\na\na\na\na\na\na\n");
    9. e.setStyleSheet("QPlainTextEdit{ border: 1px solid black; }");
    10. e.show();
    11. return a.exec();
    12. }
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Problem styling QScrollBar::handle
    By kerchen in forum Qt Programming
    Replies: 0
    Last Post: 9th November 2012, 18:06
  2. Replies: 1
    Last Post: 20th July 2011, 09:02
  3. Problem with scrolling to the bottom of a QListView
    By JohnAndy in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 22nd September 2010, 13:59
  4. QScrollbar handle stretch problem
    By Beppe in forum Qt Programming
    Replies: 4
    Last Post: 30th July 2009, 12:58
  5. Replies: 7
    Last Post: 15th November 2007, 17: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.