我有多个QLineEdits,它们在for循环中创建并存储在列表中。我只希望对所有行编辑都将一个回调函数连接到editFinished。因此,我需要在回调函数中标识已编辑的行编辑。我找不到QLineEdit的任何名称或id参数。有关如何实现此目标的任何建议?
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.csrf().disable()
.authorizeRequests()
.antMatchers("/403","/login","/footer").permitAll()
.antMatchers("/","/LifeForm**","/home").fullyAuthenticated()
//.anyRequest().authenticated()
.and()
//.httpBasic()
//.and()
.formLogin()
.loginPage("/login").failureUrl("/403").permitAll()
.and()
.logout().logoutUrl("/403").invalidateHttpSession(true).deleteCookies("JSESSIONID").logoutSuccessUrl("/login");
}
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
if(Boolean.parseBoolean(ldapEnabled)) {
auth
.ldapAuthentication()
.userSearchFilter("(&(objectClass=user)(sAMAccountName={0}))")
.groupRoleAttribute("cn")
.groupSearchFilter("(&(objectClass=groupOfNames)(member={0}))")
.groupSearchBase("ou=groups")
.contextSource()
.url(ldapUrls + ldapBaseDn)
.managerDn(ldapSecurityPrincipal)
.managerPassword(ldapPrincipalPassword);
} else {
auth
.inMemoryAuthentication()
.withUser("user").password("password").roles("USER")
.and()
.withUser("admin").password("admin").roles("ADMIN");
}
}
答案 0 :(得分:0)
您可以在插槽中使用sender()
方法来获取对QLineEdit的引用,如下所示:
def callback_lineEdit_attribute(self):
sending_lineedit = self.sender()
# (...)