Project

General

Profile

Bug #4106

3.3.4 Checkboxes

Added by Alen Damadzic about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
05/22/2015
Due date:
% Done:

0%

Estimated time:

Description

Pardon my ignorance if I've missed something blindingly obvious, but, I recently upgraded my project form 3.3.3 to 3.3.4, and all the text for all of my checkboxes has vanished.

The boxes themselves still exist, but there is not html being generated for the text.

Any pointers on how to solve this...?

Thanks in advance..

#1

Updated by Koen Deforche about 7 years ago

  • Status changed from New to Feedback
  • Assignee set to Koen Deforche

Hey,

Perhaps it's because you use the constructor without text and then set a text later with setText()? This no longer works, but this is in fact in line with the documentation:

/*! \brief Creates a checkbox without label.

  • A checkbox created by this constructor will not contain a placeholder
  • for a label, and therefore it is not possible to assign a label to it
  • later through setText().
    */
    WCheckBox(WContainerWidget *parent = 0);

You thus need to pass at least an empty text in the constructor if you want to show a label inside.

#2

Updated by Alan Finley about 7 years ago

Don't you consider this as a some kind of inconsistent behaviour?

#3

Updated by Koen Deforche about 7 years ago

It is tricky, but for a good purpose since it allows the use of the check box element in html without any accompanying label element, which makes the dom simpler and fixes possible issues with css.

#4

Updated by Benoit Daccache almost 7 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF