1

I have a small application, written in Qt, in which the MainWindow class is having 2 public slots namely:
class MainWindow : public QMainWindow
{
    Q_OBJECT
.
.
.
.
public slots:
    quint8 GetColorCode();
    QString GetRGBColorCode();
.
.
.
};

As per the Squish documents, public slots, signals and properties with Q_PROPERTY macro can be accessed directly from Squish environment. Slots and Signals appear under the Squish IDEs method list window. But unfortunately I am not able to see the above methods in the Squish IDE method list. Is there any specific way to make the public slots available to Squish?

Regards,
Bikash

BikashRDas
  • 149
  • 1
  • 10

1 Answers1

0

Squish for Qt only exposes "public" APIs. You must declare the desired slots public.

As a test I added...

public slots:
    quint8 GetColorCode();
    QString GetRGBColorCode();

...to squish_dir/examples/qt/addressbook/mainwindow.h, and...

quint8 MainWindow::GetColorCode()
{
    return 3;
}


QString MainWindow::GetRGBColorCode()
{
    return QString("3");
}

...to squish_dir/examples/qt/addressbook/mainwindow.cpp, compiled the example and loaded it in Squish.

Afterwards the "Methods" view showed these two methods when selecting the MainWindow object in the "Application Objects" view.

frog.ca
  • 684
  • 4
  • 8