From 479f5f799523bffbcc83dff581a2299c047c6fff Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:44:01 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kjsembed/docs/tutorial/kjsembed.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'kjsembed/docs/tutorial') diff --git a/kjsembed/docs/tutorial/kjsembed.html b/kjsembed/docs/tutorial/kjsembed.html index a304c3de..dc769dc3 100644 --- a/kjsembed/docs/tutorial/kjsembed.html +++ b/kjsembed/docs/tutorial/kjsembed.html @@ -54,7 +54,7 @@ pre {
  • Scripts can access the properties and slots of QObjects as if they were normal Javascript properties and methods.
  • Scripts can load dialogs and widgets created with Qt Designer.
  • -
  • Scripts can create instances of anu QWidget subclass supported by QWidgetFactory.
  • +
  • Scripts can create instances of anu TQWidget subclass supported by TQWidgetFactory.
  • Making your own QObjects/QWidgets available for scripting is one-liner.
  • Scripts can traverse the widget tree, so your entire application can be made scriptable without explicitly binding every object.
  • @@ -88,11 +88,11 @@ JSConsoleWidget (KJSEmbed::JSConsoleWidget) kjs> console.childCount() 4 kjs> console.child(1) -CmdEdit (QComboBox) +CmdEdit (TQComboBox) kjs> console.child(2) -RunButton (QPushButton) +RunButton (TQPushButton) kjs> console.child("RunButton") -RunButton (QPushButton) +RunButton (TQPushButton) kjs> console.child("RunButton").text = "Go!" Go! kjs> console.caption = "Different Title" @@ -149,7 +149,7 @@ print( cmd );

    Listing 1: A Script That Displays the Grep Dialog

    In order to find out what the user asked us to search for we need to extract the contents of the various fields in our dialog. We know that the field for - entering the text to be searched for is a QLineEdit called 'search_edit', so + entering the text to be searched for is a TQLineEdit called 'search_edit', so we can use the child() method to get hold of it (this method searches through the children of an object until it finds one with a matching name). Once we've found the right object getting hold of the text is easy because all QLineEdits -- cgit v1.2.1