mpi
12th June 2009, 19:57
Hi,
I can't seem to understand this. If I pass an empty stylesheet to a QLineEdit, the edit field changes property.
* Try to enter a 'g' in the example included below. The lower part of the 'g' will be invisible.
* Remove the call to setStyleSheet(). The lower part of the 'g' becomes visible.
Qt 4.5.1, Ubuntu 8.04
Best regards,
Mads
#include <QtGui>
#include "lineedit.h"
LineEdit::LineEdit(QWidget *parent)
: QLineEdit(parent)
{
QString style_sheet("QLineEdit {}");
setStyleSheet(style_sheet);
}
I can't seem to understand this. If I pass an empty stylesheet to a QLineEdit, the edit field changes property.
* Try to enter a 'g' in the example included below. The lower part of the 'g' will be invisible.
* Remove the call to setStyleSheet(). The lower part of the 'g' becomes visible.
Qt 4.5.1, Ubuntu 8.04
Best regards,
Mads
#include <QtGui>
#include "lineedit.h"
LineEdit::LineEdit(QWidget *parent)
: QLineEdit(parent)
{
QString style_sheet("QLineEdit {}");
setStyleSheet(style_sheet);
}