pqDesktopServicesReaction can be used to open a file (or URL) using QDesktopServices. More...
#include <pqDesktopServicesReaction.h>


Public Member Functions | |
| pqDesktopServicesReaction (const QUrl &url, QAction *parent) | |
| ~pqDesktopServicesReaction () override | |
Public Member Functions inherited from pqReaction | |
| pqReaction (QAction *parent, Qt::ConnectionType type=Qt::AutoConnection) | |
| Constructor. More... | |
| ~pqReaction () override | |
| QAction * | parentAction () const |
| Provides access to the parent action. More... | |
Static Public Member Functions | |
| static bool | openUrl (const QUrl &url) |
| Attempt to open a file (local or on the Web) using QDesktopServices. More... | |
Protected Member Functions | |
| void | onTriggered () override |
| Called when the action is triggered. More... | |
Additional Inherited Members | |
Protected Slots inherited from pqReaction | |
| virtual void | updateEnableState () |
| virtual void | updateMasterEnableState (bool) |
Protected Attributes inherited from pqReaction | |
| bool | IsMaster |
pqDesktopServicesReaction can be used to open a file (or URL) using QDesktopServices.
e.g. if your application wants to launch a PDF viewer to open the application's User Guide, you can hookup a menu QAction to the pqDesktopServicesReaction. e.g.
The URL is set as status tip on the parent action.
Definition at line 24 of file pqDesktopServicesReaction.h.
| pqDesktopServicesReaction::pqDesktopServicesReaction | ( | const QUrl & | url, |
| QAction * | parent | ||
| ) |
|
override |
|
static |
Attempt to open a file (local or on the Web) using QDesktopServices.
Returns false if failed to open for some reason, other returns true.
|
inlineoverrideprotectedvirtual |
Called when the action is triggered.
Reimplemented from pqReaction.
Definition at line 40 of file pqDesktopServicesReaction.h.
1.8.13 on Sun Dec 14 2025