How to get coordinates of selected word on QWebView - qtwebview

mighty All,
I have selected the word by QWebPage::SelectNextWord().
I just exec the code:
ui->webView->page()->triggerAction(QWebPage::SelectNextWord);
The question is: how to define coordinates of blue rect of selected word,
any method which allows to solve this (Qt, Windows MDN, jscript,...)
Does anybody know how to do this?
Regards,
Radmir

MDN Api allows to write small script, that solves the task.
Thanks,
the question is closed.
Radmir

Related

binding doesn't create text

I'm trying to set up a hi score table in my game and the binding to get the score isn't being called at all. It isn't working. It uses the same logic as the names, but doesn't display anything in the text box. binding the name function to the cell prints the hi score name fine, so I think it's a problem with int to text.
Blueprint Snips
thanks
I haven't found a direct answer to my original question, but this tutorial is a much better starting point for a hi score table
YouTube : Tefel Dev : Unreal Engine 4 Guide - Scoreboard

Setting the controlsource value of a listbox using Properties Window

I am new to VBA and am currently still studying the most basic ideas of the language. I haven't gotten that far in my VBA Code studies to write the code I need by hand, so, in the mean time, I have been using the VBA Editor to enter Property Values via the Properties Window. This has been proving far more difficult than I anticipated. My Goal is to create a drop down list for a VBA Form. I understand one of my options is to reference a range of cells in my excel worksheet by inputting it into the value field located right of the ControlSource Property. My attempts to input the desired range always comes up with the same error:
Could not set the ControlSource Property. Invalid Property Value.
I have tried looking in the VBA Help files and even searched online. I haven't had any luck finding the proper syntax to enter into this field.
I am assuming I may run into similar issues as I try to set other property values through the Property Window. Thus, I am diligently studying my VBA courses so I can simply write the raw code. But that takes time and I need this form to work as soon as possible.
Is there anyone out there that wouldn't mind lending me their brain for a moment? I would be most grateful. Having this working would bring a lot of stress off of me.
Thanks for reading!
What tigeravatar mentioned, works fine for me, for the ComboBox as well for the ListBox.
If I enter =a1:b5 into the ComboBox' RowSource, I see the values of the cells if I open the form and the Combobox. Tigeravatar's notation with $ and sheet! may be more reliable for the productive version.
The RowSource is where the boxes get their displayed items from. The ControlSource is where the chosen value finally is linked to. So if I write just A10 to the ControlSource, then open the form, then pick a value, close the form, I see the chosen value filled to the Excelsheet field A10.
Sometimes it helps to start a fresh UserForm and to add some simple fresh controls. If you seek around, you will probably alter property values that influence the behaviour in an unexpected way, and then you get lost. I have tested with Office 2010. If you have another version, it may be important to forum readers to know.

Grab focus to embedded window inside Gtk::Socket

I have embedded gvim inside a Gtk::Socket which is placed in a Gtk::Box, how can I grab focus to the embedded gvim window so that I achieve the same as actually pointing and clicking in the embedded window?
Using ->grab_focus() on the Gtk::Socket widget does not have any effect.
According to the XEMBED spec (http://standards.freedesktop.org/xembed-spec/xembed-spec-latest.html#idm139742761059984) it seems that the embedder (Gtk::Socket) should send either a XEMBED_FOCUS_IN or a XEMBED_WINDOW_ACTIVATE signal to the child, but there does not seem to be an interface for this in Gtk::Socket.
An simple example of what I am trying to do based on the Gtk::Plug and Gtk::Socket example can be found here: https://github.com/gauteh/plug-socket-grab-focus .
In case this is a bug, it has been reported here: https://bugzilla.gnome.org/show_bug.cgi?id=729248
There are now two ways to achieve this, one is by using the patch as provided in: https://bugzilla.gnome.org/show_bug.cgi?id=729248 which adds an gtk_socket_focus_forward () method to GtkSocket. Calling this will focus the first widget inside the Gtk::Plug window.
An example of using gtk_socket_focus_forward can be found in the focus_forward branch of an example adapted from the standard example.
The second way to achieve this is to send the Gtk::DIR_TAB_FORWARD signal as described on the mailing list, a similar example can be found in the tab_forward branch.
This involves the following:
socket->set_can_focus (true);
socket->child_focus (Gtk::DIR_TAB_FORWARD);
The method does diverge slightly from what is possible with gtk_socket_focus_forward, but appears to do the trick.

How does one get the total number of slides?

In Articulate's Storyline product, how does one retrieve the total number of slides (or pages) in a storyfile or project?
There's not much documentation so it's kind of hard to figure out how to query common environment values like this. If we can get the total number of slides then we don't have to manually set a value for it.
One must manually set and update a variable to store the number of slides.
The most lengthy conversation on the matter seems to be found here at the Articulate forums.
In that thread the users and staff describe the need to manually define such a variable.
I asked the question on the official forum more directly here, and so far have not received a response.
Another poster at that forum mentioned using PHP to solve this problem, but unfortunately we can't add the requirement of PHP to the final product. I'm sure some server side language tricks might be used to solve this issue, but that also adds the dependency of a particular server-side language.
The Answer Mark gave is correct. So if you want to track the number of question slides in a quiz you would either hard code the value in a variable such as totalQuestions, or increment it as you go through each slide using adjust variable trigger. To call that value and display it on screen you would just add it to a text field and surround it with "%".
EG. "You have answered %Results.ScorePoints% out of %totalQuestions% questions correctly."
I find it rather pointless to hard code it since it's just as easy to put the value in the text field at the end. Using the increment method seems more logical because then you can add more question slides without having to adjust the variable or results screen each time.
I usually load frame.xml, browse for all slidelink tags and sort all slides by their Id.
Usually you get something like slideid=_player.5xoxGTW6QCh.6bmeRt3tCqP, where 5xoxGTW6QCh is the scene id and 6bmeRt3tCqP is the slide id. displaytext also gives you the slide title.
If you browse for slidetranscript and match the Id for each transcript you also get the slide notes.
Articulate 360 now has an internal (Built-in) variable for this and other counts. See Project.TotalSlides and Menu.TotalSlides
See https://community.articulate.com/series/articulate-storyline-360/articles/storyline-360-add-slide-numbers

ice:paneConfirmation - is it really so bad?

I have discovered a nice component for confirming actions - ice:panelConfirmation. But I think, it has one big mistake. I can't change the name of heading, there is always "Confirm". It is really so bad? Or is there some possibility to change it? I need to translate it to another language, for example.
Here is my code:
<ice:panelConfirmation id="deleteConfirm" message="#{msg['really']}"
acceptLabel="#{msg['yes']}" styleClass="dialog"
cancelLabel="#{msg['no']}" displayAtMouse="true"/>
...
<ice:commandButton image="/resources/images/delete.png" action="#{postManager.delete(item)}"
title="#{msg['news.delete']}" styleClass="smallSpaces"
panelConfirmation="deleteConfirm"/>
The ice:panelConfirmation component has a "title" attribute that you can use to set the text of the popup header. Have a look here