Qt-interest Archive, April 2007
QSplitter woes
Message 1 in thread
Hi all,
I have a problem with QSplitter, I must be doing something wrong :
In a QMainWindow derived class:
splitter = new QSplitter(this);
(...add wigets in the left and right parts of the splitter...)
int leftPartWidth= 320 ;
QList<int> list;
list.append( leftTabWidth );
list.append( width()- leftPartWidth );
splitter->setSizes( list );
I would expect that the splitter is in the left part of the window, at 320
and that the right part is taking the remaining of the window.
This is absolutely not the case and when the window is maximized on a
1280*1024 screen the splitter not far from the middle of the window.
What I am missing here ?
Regards,
Alain
--
[ signature omitted ]
Message 2 in thread
Hi Alain,
Have you tried increasing the horizontalStretch factor for the right-hand
widget (see documentation for QSizePolicy).
Regards,
Sean
On Friday 06 April 2007 21:55, denebet wrote:
> Hi all,
>
> I have a problem with QSplitter, I must be doing something wrong :
> In a QMainWindow derived class:
> splitter = new QSplitter(this);
> (...add wigets in the left and right parts of the splitter...)
> int leftPartWidth= 320 ;
> QList<int> list;
> list.append( leftTabWidth );
> list.append( width()- leftPartWidth );
> splitter->setSizes( list );
>
> I would expect that the splitter is in the left part of the window, at 320
> and that the right part is taking the remaining of the window.
> This is absolutely not the case and when the window is maximized on a
> 1280*1024 screen the splitter not far from the middle of the window.
>
> What I am missing here ?
>
> Regards,
>
> Alain
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body. List archive and information:
> http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]