Bug report #11372

Position of clean button in Processing search field

Added by Pedro Venâncio about 10 years ago. Updated about 10 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:GUI
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:19663

Description

Please see the image attached.

It is not a serious problem, but is a regression.

Tested on Windows with QGIS master 2.5.0-94.

processing_clean_button.png (5.23 KB) Pedro Venâncio, 2014-10-09 07:45 AM

clean_button_xubuntu_12_04.png (13.5 KB) Pedro Venâncio, 2014-10-11 03:22 AM

Associated revisions

Revision 4e8c679b
Added by Matthias Kuhn about 10 years ago

SIP update for QgsFilterLineEdit

events have not been defined in the sip file, therefore QgsFilterLineEdits
created in python did not receive the events, leading to visual glitches.

Fix #11372

History

#1 Updated by Filipe Dias about 10 years ago

  • Operating System set to Windows

On Linux Ubuntu 14.04 it is in the right place.

#2 Updated by Pedro Venâncio about 10 years ago

On Linux Xubuntu 12.04 32bits (2.5.0+git20141010+738e0be~precise-ubuntugis1), I also get it in the wrong position.

#3 Updated by Filipe Dias about 10 years ago

  • Operating System deleted (Windows)

#4 Updated by Salvatore Larosa about 10 years ago

  • Priority changed from High to Severe/Regression
  • Category changed from Processing/GUI to GUI
  • Assignee deleted (Victor Olaya)

This seems to be a SIP python bindings problem, nothing to do with the processing framework.
Would be interesting to know if anybody gets the same behavior with a sip version > 4.13.3?

#5 Updated by Jürgen Fischer about 10 years ago

  • Status changed from Open to Feedback

#6 Updated by Matthias Kuhn about 10 years ago

I have noticed similar effects for other widgets when the "customwidgets" library was not available on the system. I do not know if it is related.

#7 Updated by Giovanni Manghi about 10 years ago

Matthias Kuhn wrote:

I have noticed similar effects for other widgets when the "customwidgets" library was not available on the system. I do not know if it is related.

it is a recent dependency of python-qgis? Now that I notice this is installed and I cannot see anymore this issue.

#8 Updated by Matthias Kuhn about 10 years ago

Thank you for testing Giovanni.

It's not directly related to python. It's related to designer and promotion of widgets. I wonder if it shouldn't be a separate package but instead be installed automatically with the qgis packge (i.e. whenever the gui lib is installed).

#9 Updated by Salvatore Larosa about 10 years ago

Hi Matthias,
are you referred to -DWITH_CUSTOM_WIDGETS=ON cmake option?
If so, for me it has not worked.

I noticed the problem is that qt event (resizeEvent() and probably others) are not took into account from QgsFilterLineEdit class when initialized by python. Oddly, defining the protected function in SIP file does it work as expected.

I thought this could be a SIP version problem and I did ask for feedback with a different SIP version.

#10 Updated by Matthias Kuhn about 10 years ago

Hi Salvatore,

Yes, I was referring to this option, I am not sure if this issue is related.

Could you test PR 1654 to check if it solves this issue?

PS:
Not specifying overwritten virtuals can indeed be a problem AFAICT. Sip will have to create it's own overwritten method to allow overwriting it from within. In the default method it has to call the parent's overwritten method, which will then be QLineEdit::resizeEvent() instead of QgsFilterLineEdit::resizeEvent()

https://github.com/qgis/QGIS/pull/1645

#11 Updated by Salvatore Larosa about 10 years ago

Hi Matthias,
maybe I have not explained well before, but adding protected functions is the workaround right now.

#12 Updated by Matthias Kuhn about 10 years ago

Hi Salvatore,

That's what the PR does. If you say it works, I can push it. And I would then not call it a workaround but rather a solution.

#13 Updated by Salvatore Larosa about 10 years ago

Hi Matthias,
yes the PR works, and it is what I am trying to say since comment n.4 :)

I already had tried that, but I was not sure if adding protected methods to SIP files is corrected and I thought it could be a SIP version issue.

So your solution is perfect! :)

#14 Updated by Matthias Kuhn about 10 years ago

  • Status changed from Feedback to Closed

#15 Updated by Matthias Kuhn about 10 years ago

Thank you for the feedback Salvatore, the SIP version confused me somehow and then I understood that customwidgets solve it for Giovanni, but good to have it solved now :)

(Packaging customwidgets along the gui libs may still be a good idea... We'll see if there are more issues concerning this)

Also available in: Atom PDF