slots

Why am I getting an error about my class defining __slots__ when trying to pickle an object?

I'm trying to pickle an object of a (new-style) class I defined. But I'm getting the following error: >>> with open('temp/connection.pickle','w') as f: ... pickle.dump(c,f) ... Traceback (most recent call last): File "<stdin>", line 2, in <module> File "/usr/lib/python2.5/pickle.py", line 1362, in dump Pickler(file, protocol...

Slot not being passed from action to layout in Symfony 1.4

I'm using the following to set a slot in an action but I can't retrieve it in the layout. $this->getResponse()->setSlot('global_message', 'You have already completed this contest.'); But if you set this in the template file, it works fine. Anyone have any ideas on this one? ...

Qt C++ WebKit windowCloseRequested Signal

Hey All, I am trying to connect QWebpage::windowCloseRequested() to a slot that just prints out a debug message. When I call window.close(); in JavaScript it doesn't bubble the signal up or call the slot... connect(webView->page(), SIGNAL(windowCloseRequested()),this, SLOT(windowCloseRequested())); The slot is setup, it is in my wind...

Why do I get two clicked or released signals when using a custom slot for a QPushButton ?

here's the main code at first I thought is was the message box but setting a label instead has the same effect. #include <time.h> #include "ui_mainwindow.h" #include <QMessageBox> class MainWindow : public QWidget, private Ui::MainWindow { Q_OBJECT public: MainWindow(QWidget *parent = 0); void makeSum(void); ...

Proper way to relay signals across classes in qt4?

I have a QMainWindow which spawns a few wizards. The QMainWindow has a QFrame class that lists a collection of objects. I want to launch this window from within my wizard's QWizardPages. Basically, I need to connect a signal to a slot in the grand parent. The most obvious way to do this would be: MyMainWindow *mainWindow = qobject_cast...

Qt QNetworkAccessManager does not emit signals

The function CheckSite() is called with an url like http://site.com, it initializes a QNetworkAccessManager object and connect() slots and signals. The manger->get() call seems work (it generates http traffic) but does not call the slot replyFinished() at the request end. What's wrong with this code? #include <QtCore> #include <QtNe...

How to pickle and unpickle objects with self-references and from a class with slots?

What is a correct way to pickle an object from a class with slots, when this object references itself through one of its attributes? Here is a simple example, with my current implementation, which I'm not sure is 100 % correct: import weakref import pickle class my_class(object): __slots__ = ('an_int', 'ref_to_self', '__weakref__...

Problem with signals and slots

Using Qt Creator, I am creating a class with custom slots in Qt: class CustomEdit : public QTextEdit { Q_OBJECT public: CustomEdit(QWidget* parent); public slots: void onTextChanged (); }; However, I'm getting thise linker error: undefined reference to 'vtable for CustomEdit' The documentation says: if you get ...

signals and slots in multilayered UI widgets

Let's say we have the follogin UI: +--------------------------+ |W1 +--------------+ | | |W2 | | | | +----------+ | | | | |W3 | | | | | +----------+ | | | | | | | +--------------+ | +--------------------------+ W3 is interested in a certain signal emi...

QT Interface with Slots

I made an interface and plugins by following this tutorial: http://doc.trolltech.com/4.6/plugins-howto.html and everything is working fine. But know I would like to connect a Signal to a slot of the plugins. Trying to do that I get an error, that the interface i lacking the Q_OBJECT Macro. When I Add it I get an error that now the Inte...