Project

General

Profile

Actions

Bug #1102

closed
AB KD

Using horizontal WSlider with WVBoxLayout or WHBoxLayout

Bug #1102: Using horizontal WSlider with WVBoxLayout or WHBoxLayout

Added by Arribe Barthelemy almost 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
12/14/2011
Due date:
% Done:

0%

Estimated time:

Description

Hi all,

I have a problem using a WSlider with WVBoxLayout. The slider is always moving ...
Here my code :

WSlider *sliderHorizontal = new WSlider(Horizontal);

//we put the range of the slider
sliderHorizontal->setRange(0,100);

//the first value
sliderHorizontal->setValue(10);

//the interval between each tick
sliderHorizontal->setTickInterval(5);

//the position of the tick
sliderHorizontal->setTickPosition(WSlider::TicksBothSides);

//we resize the slider
sliderHorizontal->resize(300, 50);

WVBoxLayout *vBoxLayout = new WVBoxLayout(this);
vBoxLayout->addWidget(sliderHorizontal);

this->setLayout(vBoxLayout);

Thanks

Bart.


Files

hello.C (896 Bytes) hello.C Pieter Libin, 12/26/2011 03:08 PM
test1.png (87.1 KB) test1.png Arribe Barthelemy, 01/04/2012 11:07 AM
test2.png (87.4 KB) test2.png Arribe Barthelemy, 01/04/2012 11:07 AM
hello.C (1.1 KB) hello.C hello.C adjusted Pieter Libin, 01/16/2012 02:58 PM
Screenshot-3.png (2.72 KB) Screenshot-3.png Pieter Libin, 01/16/2012 02:58 PM
pbSliders.zip (2.97 KB) pbSliders.zip Source code Arribe Barthelemy, 01/19/2012 05:54 PM
sliderbug.zip (2.59 KB) sliderbug.zip Pieter Libin, 01/25/2012 11:58 AM
fixed_bug1102.zip (2.47 KB) fixed_bug1102.zip Pieter Libin, 01/26/2012 05:09 PM

KD Updated by Koen Deforche almost 15 years ago Actions #1

  • Status changed from New to InProgress
  • Assignee set to Pieter Libin
  • Target version set to 3.2.1

PL Updated by Pieter Libin over 14 years ago Actions #2

Hi,

I've made a small test case (see the attachment of this message) based on your example code,
but I was not able to notice any problem with it in Firefox/Chrome/IE9.
Can you explain what exactly goes wrong, and how it can be reproduced?
Please also let us know which browser(s) you are using.

kind regards,

Pieter

AB Updated by Arribe Barthelemy over 14 years ago Actions #3

Hi,

I'm using the mozilla firefox, an old version, 3.6.24 and I am on Ubuntu 10.04.
Sorry, I was wrong. The bug happens using a WGridLayout like this :

WGridLayout *gridLayout = new WGridLayout(this);
// we add it to the container
gridLayout->addWidget(sliderHorizontal,1,1);
gridLayout->addWidget(sliderVertical,3,3);

You have two screenshot where you can see the difference between two seconds, the two sliders growing.

Regards.
Bart

PL Updated by Pieter Libin over 14 years ago Actions #4

Hi,

I tried to reproduce the problem with a WGridLayout (see my new hello.C file),
but was not able to do so (see the attached screenshot Screenshot-3.png).

I used the same version version of FireFox as you mentioned, and the git version of Wt.
Can you try to change the attached program in order to make the issue reproducable?

kind regards,

Pieter

AB Updated by Arribe Barthelemy over 14 years ago Actions #5

Hi,

It's doing the same with the last version of Firefox and too in google Chrome, built in fast CGI or http. I give you my source code, I made this in QtCreator.

After that, I don't know what else I can say you ...

Thank you

Bart

PL Updated by Pieter Libin over 14 years ago Actions #6

Hi,

with this example, I can reproduce the problem,
Thanks,

Pieter

PL Updated by Pieter Libin over 14 years ago Actions #7

A slightly updated test case, that reproduces the problem.

PL Updated by Pieter Libin over 14 years ago Actions #8

  • Assignee changed from Koen Deforche to Pieter Libin

PL Updated by Pieter Libin over 14 years ago Actions #9

Hi,

when using a layout, you need to resize the container where you use the layout manager on (see the WGridLayout documentation).
Also, if you put a widget in a layout manager, you cannot resize the widget.

When making these changes to the example, everything seems to work fine.
I attached the fixed code in fixed_bug1102.zip.

Kind regards,

Pieter

PL Updated by Pieter Libin over 14 years ago Actions #10

  • Assignee changed from Pieter Libin to Koen Deforche

KD Updated by Koen Deforche over 14 years ago Actions #11

  • Status changed from Resolved to Closed

Fixed in 3.2.1

Actions

Also available in: PDF Atom