Results 1 to 5 of 5

Thread: Using Scrollbar on mainwindow

  1. #1
    Join Date
    Oct 2009
    Posts
    12
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Using Scrollbar on mainwindow

    Hi all,

    How to add a scrollbar on mainwindow .. I tried using scrollbar area but its not working.
    Please suggest..

    Thanks
    Amit

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Using Scrollbar on mainwindow

    put your widget inside a QScrollArea, and add that with QMainWindow::setCentralWidget();

    if you can't get it working, show us some code

  3. #3
    Join Date
    Oct 2009
    Posts
    12
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Using Scrollbar on mainwindow

    I tried implementing your idea but its not working may be i am not trying the right way...

    Can I get a small piece of code just to show 10 buttons on a screen (or may be more) so that all buttons can't be displayed at a time and one can see them by scrolling the page..

    Thanks in advance..

  4. #4
    Join Date
    Oct 2009
    Posts
    12
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Using Scrollbar on mainwindow

    Now I am able to do that with help of QScrollArea.....

  5. #5
    Join Date
    Oct 2010
    Posts
    5
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Using Scrollbar on mainwindow

    can you pls post ur project code it wud be helpfull for me .
    even i am also facing da same problem ..
    thanks in advance

Similar Threads

  1. Using Scrollbar mainwindow
    By Amit_3117 in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2009, 16:57
  2. mainwindow modality
    By user in forum Qt Programming
    Replies: 0
    Last Post: 11th July 2008, 00:54
  3. Replies: 1
    Last Post: 11th September 2007, 13:34
  4. GraphicsView/GraphicsScene: scrollbar policy Qt::ScrollBarAsNeeded
    By Pieter from Belgium in forum Qt Programming
    Replies: 4
    Last Post: 21st March 2007, 13:15
  5. about scrollbar style
    By qtopiahooo in forum Qt Programming
    Replies: 1
    Last Post: 25th January 2007, 13:34

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.