Get coordinates of dicom image by clicking anywhere on image in Qt
-
HI
you can not promote a widget to 2 different widgets.
That is not possible but would be cool if it could work :)
You can have 2 widgets but im not sure why you want that.From the code, matDisplay is your version of QVTKWidget so
you should place a QWidget and promote that to matDisplay.And it then contains your extra code for mousePress and all of QVTKWidget
-
I tried this way.
I used QWidget for my matDisplay class and promoted to matDisplay.
But when I use that same QWidget in my code to load image, It shows those same errors.
Error C2039 'SetRenderWindow': is not a member of 'matDisplay'
Error C2039 'GetInteractor': is not a member of 'matDisplay'(because it is promoted to only matDisplay and not to QVTKWidget)
I need only one widget where i can load dicom image (which are connected to render window and interactor in my code) and use that same widget to get coordinates of that dicom image.
Sorry I tried all ways, but don't understand how to achieve these both things using only one widget.
Kindly please help me. -
Inherit matWidget from QVTKWidget.