Project

General

Profile

Actions

Bug #1102

closed

Using horizontal WSlider with WVBoxLayout or WHBoxLayout

Added by Arribe Barthelemy over 12 years ago. Updated about 12 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
Actions #1

Updated by Koen Deforche over 12 years ago

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

Updated by Pieter Libin over 12 years ago

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

Updated by Arribe Barthelemy over 12 years ago

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

Updated by Pieter Libin over 12 years ago

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

Actions #5

Updated by Arribe Barthelemy about 12 years ago

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

Actions #6

Updated by Pieter Libin about 12 years ago

Hi,

with this example, I can reproduce the problem,

Thanks,

Pieter

Actions #7

Updated by Pieter Libin about 12 years ago

A slightly updated test case, that reproduces the problem.

Actions #8

Updated by Pieter Libin about 12 years ago

  • Assignee changed from Koen Deforche to Pieter Libin
Actions #9

Updated by Pieter Libin about 12 years ago

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

Actions #10

Updated by Pieter Libin about 12 years ago

  • Assignee changed from Pieter Libin to Koen Deforche
Actions #11

Updated by Koen Deforche about 12 years ago

  • Status changed from Resolved to Closed

Fixed in 3.2.1

Actions

Also available in: Atom PDF