I need to open some link (in my default browser) in a way similar to setOpenExternalLink on Qlabel, but by clicking on an item in the menu.
Is there some simple way?
I think about using Qlabel with required link and use some action/event to pretend the click on it, meanwile the Qlabel was hidden.
Upon clicking the specific menu item (handled using your standard signals and slots) you could use
openUrl(const QUrl &url)of QDesktopServices to have that link launch in your default browser.As the documentation states, it will open
So no need for fancy tricks with QLabels and the like.