forked from ggobi/qtbase
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquestions.txt
45 lines (30 loc) · 1.33 KB
/
questions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
o Can we use user-written classes (defined in C++) from R yet? e.g.,
RSyntaxHighlighter
o Related question: Let's say I want to manipulate a QWidget in
native code; e.g.
In R:
edit <- Qt$QTextEdit()
The in C++:
QTextEdit *editor = getPointer(edit);
RSyntaxHighlighter *highlighter =
new RSyntaxHighlighter(editor->document());
unwrapQWidget() doesn't work obviously, as it uses the old model.
What would be the equivalent in the new world? If this is
available, then we probably get some flexibility in using both the
old and new models together, even if we can't easily make new C++
classes available in R.
o I define
qselectedText.QTextEdit <- function(x) {
x$textCursor()$selection()$toPlainText()
}
Can I make it so that I can call this as x$selectedText()? Do I
need to define a new (R-level) class for that? If so, is that
implemented yet?
o Is user.data supported in qconnect? qtbase/src/RDynamicQObject.cpp
has a TODO which suggests not.
o QFont conversion: why does this not work:
> Qt$QFont(qfont())
Error in qinvokeStatic(cl, name, ...) :
Wrong number or types of arguments passed to 'QFont::QFont'
Not a big deal, as we can do Qt$QFont("monospace") etc., but still
curious, as QFont is handled in qtbase/src/convert.cpp