QskTextInput having the same default size policy as QLineEdit (
Expanding/Fixed )
This commit is contained in:
parent
6d329e1e39
commit
83a18a83c2
|
@ -48,12 +48,14 @@ namespace
|
||||||
{
|
{
|
||||||
auto input = new QskTextInput( "Only Read Me", this );
|
auto input = new QskTextInput( "Only Read Me", this );
|
||||||
input->setReadOnly( true );
|
input->setReadOnly( true );
|
||||||
|
input->setSizePolicy( Qt::Horizontal, QskSizePolicy::MinimumExpanding );
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
auto input = new QskTextInput( "12345", this );
|
auto input = new QskTextInput( "12345", this );
|
||||||
input->setMaxLength( 5 );
|
input->setMaxLength( 5 );
|
||||||
input->setEchoMode( QskTextInput::PasswordEchoOnEdit );
|
input->setEchoMode( QskTextInput::PasswordEchoOnEdit );
|
||||||
|
input->setSizePolicy( Qt::Horizontal, QskSizePolicy::Fixed );
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -314,7 +314,7 @@ QskTextInput::QskTextInput( QQuickItem* parent )
|
||||||
setAcceptedMouseButtons( m_data->textInput->acceptedMouseButtons() );
|
setAcceptedMouseButtons( m_data->textInput->acceptedMouseButtons() );
|
||||||
m_data->textInput->setAcceptedMouseButtons( Qt::NoButton );
|
m_data->textInput->setAcceptedMouseButtons( Qt::NoButton );
|
||||||
|
|
||||||
initSizePolicy( QskSizePolicy::Minimum, QskSizePolicy::Fixed );
|
initSizePolicy( QskSizePolicy::Expanding, QskSizePolicy::Fixed );
|
||||||
}
|
}
|
||||||
|
|
||||||
QskTextInput::QskTextInput( const QString& text, QQuickItem* parent )
|
QskTextInput::QskTextInput( const QString& text, QQuickItem* parent )
|
||||||
|
|
Loading…
Reference in New Issue