Wednesday, July 9th 2008, 4:26am UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

wildsalmon

Beginner

Posts: 2

Location: Seattle

1

Monday, April 14th 2008, 10:34pm

Eclipse plugin AddressBook sample missing a slot?

I am working on Fedora/Eclipse/Qt4.3.4.

I am doing the AddressBook sample that came with the Eclipse plugin, following the cheat sheet provided.

When Iget to the stage where I have to wire up the Add button on the main form by using the signals/slots editor, I find that the form has no 'accept()' slot, even if I choose 'Show all signals and slots'. When I open up the CPP file for the dialog, I see my dialog class has been derived from QWidget, like this:

#include <QtGui/QWidget>
#include "ui_addressbook.h"

class AddressBook : public QWidget
{
Q_OBJECT

.....etc ....

So basically I think the problem is that the AddressBook should be derived from QDialog to get that accept() slot.

Is that right?

If it is, how did I get the wrong base class ?

How can I most easily fix it? I could just edit the header but not sure of all the other references.

BTW the app compiles and runs just fine but of course the buttons don't do anythings.

Thanks loads

wildsalmon
Free fish for free men ....

This post has been edited 1 times, last edit by "wildsalmon" (Apr 14th 2008, 10:35pm)

  • Go to the top of the page

wildsalmon

Beginner

Posts: 2

Location: Seattle

2

Tuesday, April 15th 2008, 12:06am

RE: Eclipse plugin AddressBook sample missing a slot?

I'm going to answer my own question here, since I know you are all just dying to know: when I made the dialog earlier in the project, I was presented with a list box containing QWidget and QDialog and a bunch of other prospective base classes. The cheatsheet did not tell me to use QDIalog and I was not quick witted enough to figure it out.

I patched the CPP file, header, and UI files, and now it's fine.

IMO the plugin/cheatsheet has a small bug in it for those who track these things.

And if you are wondering why I answer my own mail, it's so others with the same problem can get the answer through Google.

wildsalmon
Free fish for free men ....
  • Go to the top of the page

Rate this thread