Hi!
I need to have a QLineEdit which has a checkbox besides (left) it.
So what I'd like is something like a QCheckBox, but instead the label, a line edit should be shown.
I already tried something like
le->setParent(c);
QCheckbox * c =new QCheckBox("");
QLineEdit * le = new QLineEdit;
le->setParent(c);
To copy to clipboard, switch view to plain text mode
But then only the line edit is shown.
Also I don't know how to handle the lineedit, when subclassing QCheckBox
{
{
//how can I set the lineedit as "content" instead of the label?
}
}
class CheckableLineEdit : public QCheckBox
{
CheckableLineEdit(QWidget * p)
: QCheckBox("", p)
{
//how can I set the lineedit as "content" instead of the label?
}
}
To copy to clipboard, switch view to plain text mode
I do not want a checkbox inside the line edit, eg. like the delete buttons (I think in wxwidgets).
Thanks in advance!
Olli
Bookmarks