Clickable link in InfoPanel

Asked by Daniel Carrion

Before I go crazy with creating a new panel, is it possible to turn on interactive flag somehow so that links that are in the InfoPanel when someone clicks an object are clickable? I can see that the links are coming through but they are not clickable. I.e. It just selects whatever is behind it in the sky.

Question information

Language:
English Edit question
Status:
Answered
For:
Stellarium Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alexander Wolf (alexwolf) said :
#1

Do you mean GUI items over the sky?

Revision history for this message
Daniel Carrion (dcarrion87) said :
#2

Yes. I'd like to include a link in the InfoPanel QGraphicsTextItem. It seems to work but I cannot interact with the link (clink on it). I'm guessing this is because of default Qt::NoTextInteraction flag? Is there any way I can set properties of the InfoPanel thats initialised in SkyGui without creating a whole new one, just to have a clickable HTTP link?

Revision history for this message
Alexander Wolf (alexwolf) said :
#3

No, this doesn't work, even if setOpenExternalLinks(true) is used in InfoPanel.

Revision history for this message
Daniel Carrion (dcarrion87) said :
#4

Do you have any suggestions? Should I create a completely new QGraphicsTextItem that overrides InfoPanel just for my module and with textInteraction flags set? Or is there something more simple I can do?

Revision history for this message
Alexander Wolf (alexwolf) said :
#5

No simple way, sorry.

Revision history for this message
Bogdan Marinov (daggerstab) said :
#6

I vaguely remember experimenting with that feature for the info panel, but
I don't remember the results. It's possible that it's possible. ;) But I
don't have time to retrace my steps.

I think that the widget should be set not to pass the clicks to its parent,
or to accept focus, or something like that. Look at the documentation of
QGraphicsItem.

Can you help with this problem?

Provide an answer of your own, or ask Daniel Carrion for more information if necessary.

To post a message you must log in.