Results 1 to 5 of 5

Thread: How to add scrollbar...?

  1. #1
    Join Date
    Oct 2010
    Posts
    4
    Qt products
    Platforms
    Windows

    Default How to add scrollbar...?

    How can v add a scrollbar to a listWidget-checkBox combination? ('combination' means thr ll be one checkbox corresponding to (or on right of) each listWidget item)

    i tried this:
    created a listWidget and a set of, say 10, checkBox ctrls.
    then created a widget, and dragged all into the widget.
    then created a scrollArea, and dragged the widget into the scrollArea. (this step may not be necessary)
    then added this code on pageload, as per the tutorial says:
    ui->scrollArea->setWidget(ui->widget);

    but i get runtime error. (no helpful info shown about the error)
    WHY!?
    Last edited by jojanpm; 22nd October 2010 at 12:37.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    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: How to add scrollbar...?

    Don't create checkboxes for the items. Use Qt::CheckStateRole for items in your list widget.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2010
    Posts
    4
    Qt products
    Platforms
    Windows

    Default Re: How to add scrollbar...?

    wysota, i cudnt undrstd ur reply. whr shud i add Qt::CheckStateRole?
    wud u plz shw some piece of code?

  4. #4
    Join Date
    Oct 2010
    Posts
    37
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to add scrollbar...?

    I can't understand anything you say. If you made a mockup picture and explained fully it would be easier. If you want someone to understand a difficult topic then make it easier for them to understand- other they have to waste brainpower trying to decrypt what you're saying.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    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: How to add scrollbar...?

    Quote Originally Posted by jojanpm View Post
    wysota, i cudnt undrstd ur reply. whr shud i add Qt::CheckStateRole?
    wud u plz shw some piece of code?
    In d plc wr it nds b add.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Using Scrollbar on mainwindow
    By Amit_3117 in forum Qt Programming
    Replies: 4
    Last Post: 30th October 2010, 05:09
  2. ScrollBar
    By damodharan in forum Qt Programming
    Replies: 1
    Last Post: 11th February 2010, 14:50
  3. What do I need to create this scrollbar?
    By technoViking in forum Qt Programming
    Replies: 2
    Last Post: 15th October 2009, 15:28
  4. scrollbar in a qframe
    By davea402 in forum Qt Programming
    Replies: 2
    Last Post: 21st February 2008, 18:26
  5. Scrollbar
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 31st October 2007, 07:33

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.