Tool Descriptions

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Tool Descriptions

Gary S
This post was updated on .
I've taken the tool descriptions (tool-descriptions) and have inserted them into lc_actionfactory.cpp. I put the text into the line to sets the WhatsThis property [e.g. action->setWhatsThis("Draw a line between two assigned points.") ]. After compiling, I can run LibreCAD and get the text to appear by selecting at tool and pressing [F1]:

I also tried adding the setToolTip method [e.g. action->setToolTip("Draw a line between two assigned points."); ] recompiled, etc, but the tips don't appear when I hover with the mouse. I do see tips when I hover over snaps, zooms, etc on the tool bars. Can anyone offer a suggestion on how to get the tips to appear for the drawing tools?

Update: It appears there is a bug with qt that prevents tool tips from appearing. Oh well...

Reply | Threaded
Open this post in threaded view
|

Re: Tool Descriptions

LordOfBikes
Administrator
Gary,

which Qt version do you use?

Armin
Reply | Threaded
Open this post in threaded view
|

Re: Tool Descriptions

Gary S
Hello Armin,

I have been compiling against 5.7.1.  I also have 5.10.1 installed and was going to try to compile against that.  Up until now I've been compiling from the command line which defaults to 5.7.1 (?), but haven't figured out how to switch to the more recent Qt libraries.  If you can offer a hint, I'd appreciate it.  I just started using Qt Creator, so I'm still getting my head wrapped around that...


Cheers,
Gary
Reply | Threaded
Open this post in threaded view
|

Re: Tool Descriptions

LordOfBikes
Administrator
Gary,

how to use multiple Qt versions depends on your operating system.

For Linux there is a package called qtchooser. Here is a blog post about how to use it:
https://harishnavnit.wordpress.com/2014/03/24/handling-multiple-versions-of-qt/

On Windows I think additional shortcuts for the Qt command window should work. You have to modify the shortcut preferences to apply the path and appropriate environment settings (qtenv2.bat) for each version.

Armin
Reply | Threaded
Open this post in threaded view
|

Re: Tool Descriptions

Gary S
I managed to compile against Qt 5.10.1, but is still didn't work - no tool tips.  I've attached the file, currently only 2-point line has the tool tip defined:

lc_actionfactory.cpp

If some else can compile it on something other than Linux, let me know if it works.  Thanks..
Reply | Threaded
Open this post in threaded view
|

Re: Tool Descriptions

Gary S
This post was updated on .
I've had success with tool tips when hovering over an icon.  Aside from correcting a spelling mistake , I also discovered that if using the "Categories" toolbar, it doesn't work.  However, if using the specific toolbar, such as "Line", the tool tips work fine:


Here is the latest file (updated file):
lc_actionfactory.cpp