Results 1 to 3 of 3

Thread: space between widgets in qgridlayout

  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default space between widgets in qgridlayout

    I cannot get rid of space between Widget in (1,1) and layouts in (2,1) and (1,2) in QGridLayout().
    Screenshoot: http://alan.umcs.lublin.pl/~mroman/S...35.00%20PM.png
    Source: http://alan.umcs.lublin.pl/~mroman/qtlayout.zip
    I suppose this is a bug in qt. I am running mac 10.6 qt 4.6.0.

    If you comment:
    trackScaleLayout->addWidget(sppSlider,0);
    and
    channelsScaleLayout->addWidget(trackHeightSlider,0);
    then there is no space between the QTextEdit and rear layouts. This is what I want.

    It actually looks better with this space on kde, but not on mac.

    I would be grateful, if you take a look at it.

  2. #2
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: space between widgets in qgridlayout

    for me it looks like slider width is greater than scroll bar width (height in horizontal ones). Check if setMaximumWidth(16) for both , slider and scrollbar, would reduce the spacing (16 is pretty small so then you adjust this value to your needs, but check if it works)
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  3. #3
    Join Date
    Jan 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: space between widgets in qgridlayout

    Thanks for your suggestion. Unfortunatelly it doesn't work. QSliders get closer, but Scrolls don't. On kde it's sufficient to set AlignLeft/Top, but it doesn't seem to work on mac.
    I have tried to 'wrap' these layouts in qwidgets, but it looks the same.

Similar Threads

  1. QTableView empty space or too little space.
    By davemar in forum Qt Programming
    Replies: 2
    Last Post: 16th October 2009, 16:00
  2. Replies: 1
    Last Post: 26th July 2009, 15:08
  3. empty space in QGridLayout
    By eleanor in forum Qt Programming
    Replies: 1
    Last Post: 4th July 2008, 09:36
  4. Delete a QGridLayout and New QGridLayout at runtime
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 5th November 2007, 13:01
  5. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

Tags for this Thread

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.