Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, February 2007
[Qt3] Need help with QScrollView


Message 1 in thread

Hello!

I use QScrollView to align a number of QLineEdits vertically and gain
ability to add/remove them in runtime. Here's example:

    QScrollView * view = new QScrollView( page );
    view->setBackgroundMode( Qt::PaletteBase );
    view->setFrameStyle( QFrame::NoFrame );

    QVBox* box = new QVBox(view->viewport());
    box->setSpacing( *some number* );
    view->addChild(box);

    for(int i = 0; i < 10; ++i)
        QLineEdit * lineEdit = new QLineEdit( box );

Its all ok except for all edits are resized to their sizeHint() and
theres a gray area to the left and to the bottom.

I want to stretch edits horizontally and hide/change color of that gray area.

--
 [ signature omitted ] 

Message 2 in thread

On 01/02/07, Dmitry Teslenko <dteslenko@xxxxxxxxx> wrote:
>and hide/change color of that gray area.

That's solved: I was to modify QScrollView::viewport() color.

--
 [ signature omitted ]