Skip to content
Permalink
Browse files

Simplify some editor widget parenting

  • Loading branch information
nyalldawson committed Apr 5, 2016
1 parent 0c16195 commit c58a198b095d70ce6fcbedf9c47d98b6f8e59489
@@ -70,8 +70,8 @@ QWidget* QgsFileNameWidgetWrapper::createWidget( QWidget* parent )
container->setBackgroundRole( QPalette::Window );
container->setAutoFillBackground( true );

QLineEdit* le = new QgsFilterLineEdit( container );
QPushButton* pbn = new QPushButton( tr( "..." ), container );
QLineEdit* le = new QgsFilterLineEdit();
QPushButton* pbn = new QPushButton( tr( "..." ) );
QGridLayout* layout = new QGridLayout();

layout->setMargin( 0 );
@@ -160,11 +160,11 @@ void QgsPhotoWidgetWrapper::showIndeterminateState()
QWidget* QgsPhotoWidgetWrapper::createWidget( QWidget* parent )
{
QWidget* container = new QWidget( parent );
QGridLayout* layout = new QGridLayout( container );
QgsFilterLineEdit* le = new QgsFilterLineEdit( container );
QgsPixmapLabel* label = new QgsPixmapLabel( parent );
QGridLayout* layout = new QGridLayout();
QgsFilterLineEdit* le = new QgsFilterLineEdit();
QgsPixmapLabel* label = new QgsPixmapLabel();
label->setObjectName( "PhotoLabel" );
QPushButton* pb = new QPushButton( tr( "..." ), container );
QPushButton* pb = new QPushButton( tr( "..." ) );
pb->setObjectName( "FileChooserButton" );

layout->addWidget( label, 0, 0, 1, 2 );
@@ -71,11 +71,11 @@ void QgsWebViewWidgetWrapper::showIndeterminateState()
QWidget* QgsWebViewWidgetWrapper::createWidget( QWidget* parent )
{
QWidget* container = new QWidget( parent );
QGridLayout* layout = new QGridLayout( container );
QgsFilterLineEdit* le = new QgsFilterLineEdit( container );
QWebView* webView = new QWebView( parent );
QGridLayout* layout = new QGridLayout();
QgsFilterLineEdit* le = new QgsFilterLineEdit();
QWebView* webView = new QWebView();
webView->setObjectName( "EditorWebView" );
QPushButton* pb = new QPushButton( tr( "..." ), container );
QPushButton* pb = new QPushButton( tr( "..." ) );
pb->setObjectName( "FileChooserButton" );

layout->addWidget( webView, 0, 0, 1, 2 );

0 comments on commit c58a198

Please sign in to comment.
You can’t perform that action at this time.