[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Question about widget sizes in QSplitter, using Qt 4.3
From:       "Wagner Sales" <wsales () gmail ! com>
Date:       2008-02-21 19:06:18
Message-ID: 11b83aa60802211106v6a48eeb1vb194b30b666297b7 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi all,

May this are a stupid question ( i think are ) but I'm really annoyed with
my customized widgets sizes inside QSplitter. To explain my situation:
1) I have tho widgets that's directly inherits QWidget. No size policy or
size are changed, just a few methods connecting between slider and my
viewport, wich are a QWidget direct inheritance too, without policy or size
changes.
2) The first widget have an QSlider and a QWidget inside, aligned by a
QHBoxLayout ( I tried QBoxLayout too ).
3) The second widget have another QWidget inherited class, without changes
in sizes or size policy.
4) I was created plugins for QDesigner with these widgets ( but the problem
'll describe was occurred before this step too, by manually adding widgets
in a cpp file ).

I was read the QSplitter doc, QSplitterHandle doc, and aren't helped me.
Well, I need these widges, at the first show, have same size (independently
of the screen size or window size ). By using QDesigner, I done this and
called the preview, wich show to me the anexed picture.
The first window are the designer window, with the widgets in the QSplitter
and in a QGridLayout ( I tried others too ). The second picture are the
widget in preview mode. That's show to me that's the first widget are
occupied the entirely widget, and the splitter handler are at the extreme
left side of the window.

With these problem, I tried:
1) Change the window size policy (Minimum, MinimumExpanding and so on) in
both widgets. Nothing happens.
2) In the inherited class ( from .ui ) a QDebug of QSplitter::sizes(), wich
are returned 0 to me in both widgets.

What's I want to know are how to control the widget sizes in a QSplitter.
But I can't simply set a fixed number size. I don't know nothing about the
screen or window size which my application will run. Then, my widget needs
to be shown with, in this example, each widget with 50% of the window or
frame, for example. What's I tried are to simply put the widgets in
QDesigner and expects the first proportion will be maintained, but that's
not happens.

Can anyone help me with some tip or doc?

Thks in advance,

Wagner Sales

[Attachment #5 (text/html)]

Hi all,<br><br>May this are a stupid question ( i think are ) but I&#39;m really \
annoyed with my customized widgets sizes inside QSplitter. To explain my \
situation:<br>1) I have tho widgets that&#39;s directly inherits QWidget. No size \
policy or size are changed, just a few methods connecting between slider and my \
viewport, wich are a QWidget direct inheritance too, without policy or size \
changes.<br>

2) The first widget have an QSlider and a QWidget inside, aligned by a QHBoxLayout ( \
I tried QBoxLayout too ).<br>3) The second widget have another QWidget inherited \
class, without changes in sizes or size policy.<br>4) I was created plugins for \
QDesigner with these widgets ( but the problem &#39;ll describe was occurred before \
this step too, by manually adding widgets in a cpp file ).<br>

<br>I was read the QSplitter doc, QSplitterHandle doc, and aren&#39;t helped \
me.<br>Well, I need these widges, at the first show, have same size (independently of \
the screen size or window size ). By using QDesigner, I done this and called the \
preview, wich show to me the anexed picture.<br>

The first window are the designer window, with the widgets in the QSplitter and in a \
QGridLayout ( I tried others too ). The second picture are the widget in preview \
mode. That&#39;s show to me that&#39;s the first widget are occupied the entirely \
widget, and the splitter handler are at the extreme left side of the window.<br>

<br>With these problem, I tried:<br>1) Change the window size policy (Minimum, \
MinimumExpanding and so on) in both widgets. Nothing happens.<br>2) In the inherited \
class ( from .ui ) a QDebug of QSplitter::sizes(), wich are returned 0 to me in both \
widgets.<br>

<br>What&#39;s I want to know are how to control the widget sizes in a QSplitter. But \
I can&#39;t simply set a fixed number size. I don&#39;t know nothing about the screen \
or window size which my application will run. Then, my widget needs to be shown with, \
in this example, each widget with 50% of the window or frame, for example. What&#39;s \
I tried are to simply put the widgets in QDesigner and expects the first proportion \
will be maintained, but that&#39;s not happens.<br>

<br>Can anyone help me with some tip or doc?<br><br>Thks in advance,<br><br>Wagner \
Sales<br>


["splitter_picture" (application/octet-stream)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic