Results 1 to 4 of 4

Thread: Using QRubberBand class?!?!?

  1. #1
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Arrow Using QRubberBand class?!?!?

    hi i wish to use the QRubberBand class to select the Icons put forth by QListView (i.e ViewMode is set to show Icons). Can this selection happen automatically or will I have to explicitly create a rubberband object to do this??

    I did read the Qt4 doc, but I was not able to understand as how do I put the rubberband to use, w.r.t. the above scenario????

    Thanks

    Nupul

  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: Using QRubberBand class?!?!?

    Did you at least try using a list view before posting? Rubber band is drawn automatically. You would have known if you tried it (for example by putting a list view in Designer and previewing).

  3. #3
    Join Date
    Mar 2006
    Posts
    172
    Thanks
    30
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Red face Re: Using QRubberBand class?!?!?

    thanks wysota,...

    I actuall tried it again...(code problems!!! )and it worked.

    Well the reason i put forth this doubt was basically to know when does one explicitly need to use the QRubberBand Class.............

  4. #4
    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: Using QRubberBand class?!?!?

    To be honest? I don't know. Even the Trolls don't use it in their examples (at least I haven't seen it in use). They use QStyle::drawControl() with QStyle::CE_RubberBand.

    I guess it could be used if you wanted the band to be persistent and stretchable/movable. If you just need to draw a band during mouse dragging and don't intend to interact with the rubber band, you can use drawControl() instead.

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.