Results 1 to 3 of 3

Thread: setContentsMargins in QAbstractItemView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,369
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: setContentsMargins in QAbstractItemView

    I think you should first set the layout for the widget and then change the margins and not the other way round.

  2. #2
    Join Date
    Jan 2006
    Location
    Minsk, Brest, Belarus
    Posts
    54
    Thanks
    3
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Red face Re: setContentsMargins in QAbstractItemView

    QGridLayout has two functions that you shoulf use:
    setMargin( int ) // you should use 0
    setSpacing( int ) // 0

    This is the solution of your problem.

Similar Threads

  1. Replies: 2
    Last Post: 26th February 2009, 10:12
  2. Need help getting QAbstractItemView syntax correct
    By Hookem in forum Qt Programming
    Replies: 3
    Last Post: 4th December 2008, 09:34
  3. Subclassing QAbstractItemView
    By psih128 in forum Qt Programming
    Replies: 4
    Last Post: 13th October 2008, 07:32
  4. QAbstractItemView and updating selected items
    By Isaac in forum Qt Programming
    Replies: 3
    Last Post: 13th June 2008, 12:23
  5. QAbstractItemView
    By defumar in forum Newbie
    Replies: 9
    Last Post: 22nd January 2008, 13:50

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.