t-artistik / qtscriptgenerator

Automatically exported from code.google.com/p/qtscriptgenerator
0 stars 0 forks source link

Protected class members are not accessible to subclasses #33

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I encountered this problem when trying to reimplement an event handler in a
class derived from QWidget and to call the base class implementation in it.
But event handler functions are not accessible, or any other protected
member functions. There should be some way for subclasses to call those
functions. 

What steps will reproduce the problem?

Here is a simple example which doesn't make much sense, but should still be
runnable (assumming that bindings would have all the methods from Qt classes). 

Run the following code with qs_eval : 

function A()
{
    QWidget.call(this);

    // test calling any protected method of QWidget
    this.resetInputContext();
}

A.prototype = new QWidget();

a = new A();

What is the expected output? What do you see instead?

Uncaught exception at ...: ReferenceError: resetInputContext is not defined

What version of the product are you using? On what operating system?
Qt 4.5.0-snapshot-20090127, Qt script generator commit
940bf9c93ef10aa3303245474f1698ce0cade941, Ubuntu Linux. 

Original issue reported on code.google.com by timo.pit...@sesca.com on 6 Feb 2009 at 3:58