Results 1 to 2 of 2

Thread: scrollbar implememtation for the widget in the grid.

  1. #1
    Join Date
    Jan 2009
    Posts
    13
    Qt products
    Qt4

    Arrow scrollbar implememtation for the widget in the grid.

    i am unable to display the scrollbar using the below code.
    QScrollBar *scroll = new QScrollBar(window );
    setCentralWidget(scroll);

    scrollbar is coming but not at the top right corner of the widget and it is of huge size.
    I am trying to put that into my image gallery to scroll the images up and down in a grid.

    Information on this would be helpful.

    Regards,
    Prajna

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: scrollbar implememtation for the widget in the grid.

    I think QScrollbar is the wrong class to use, it just provides a scroll BAR ,,,
    Use QScrollArea instead. You can set this as central Widget of your main window.

    Also you will need to setup some widget to the QScrollArea object. Look into assistant for more help

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
  •  
Qt is a trademark of The Qt Company.