Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[attributeform] Fix value relation editor widget fail to bind to a UI form combo box #55964

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/gui/editorwidgets/qgsvaluerelationwidgetwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,7 @@ QWidget *QgsValueRelationWidgetWrapper::createWidget( QWidget *parent )

void QgsValueRelationWidgetWrapper::initWidget( QWidget *editor )
{

mComboBox = qobject_cast<QgsToolTipComboBox *>( editor );
mComboBox = qobject_cast<QComboBox *>( editor );
mTableWidget = qobject_cast<QgsFilteredTableWidget *>( editor );
mLineEdit = qobject_cast<QLineEdit *>( editor );

Expand Down Expand Up @@ -497,7 +496,7 @@ QVariant::Type QgsValueRelationWidgetWrapper::fkType() const
return QVariant::Type::Invalid;
}

void QgsValueRelationWidgetWrapper::populate( )
void QgsValueRelationWidgetWrapper::populate()
{
// Initialize, note that signals are blocked, to avoid double signals on new features
if ( QgsValueRelationFieldFormatter::expressionRequiresFormScope( mExpression ) ||
Expand Down
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsvaluerelationwidgetwrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class GUI_EXPORT QgsValueRelationWidgetWrapper : public QgsEditorWidgetWrapper
//! Sets the values for the widgets, re-creates the cache when required
void populate( );

QgsToolTipComboBox *mComboBox = nullptr;
QComboBox *mComboBox = nullptr;
QgsFilteredTableWidget *mTableWidget = nullptr;
QLineEdit *mLineEdit = nullptr;

Expand Down
Loading