def create_central_widget
    cw = Qt::Widget.new self
    self.central_widget = cw
# Input search text
    @search_text = Qt::LineEdit.new
    @search_text.text = 'Search?'
# Search result list
    @search_result = Qt::ListWidget.new
# Dummy fill
    1.upto(100) { |i|  @search_result.add_item i.to_s }
# Middle window is editor
    @big_editor = Qt::TextEdit.new
    @big_editor.setPlainText("Just a text")

    search_area_widget = Qt::Widget.new

    l = Qt::VBoxLayout.new search_area_widget cw
    l.add_widget @search_text
    l.add_widget @search_result

    splitter = Qt::Splitter.new cw
    splitter.add_widget(search_area_widget)
    splitter.add_widget(@big_editor)

 end
##########################################################

This is part of program which creates main window dialog.

I would like to have two areas splitted by splitter. On the left side
there a two widgets. Input search LineEdit widget and search result
ListWidget widget. They both reside on VBoxLayout.

On the second area there is big_editor TextEdit widget.

My problem is that I expect that dialog will fill whole dialog window.
It will be streched from to to bottom and from left to right. But it
doesnt. It has it's default size (which I was unuble to resize). I have
tried all kind of streches but nothing helps.

Splitter works as expected. It resizes left and right part of split area
and widget resize ok.

What am I doing wrong.

by
TheR
-- 
Posted via http://www.ruby-forum.com/.