Qt Forum - programming with C++ and Qt
Register Calendar Members List Team Members Search Frequently Asked Questions Go to the Main Page

Qt Forum - programming with C++ and Qt » QtForum.org » Qt » Qt Designer » Eclipse plugin AddressBook sample missing a slot? » Hello Guest [Login|Register]
Last Post | First Unread Post Print Page | Recommend to a Friend | Add Thread to Favorites
Post New Thread Post Reply
Go to the bottom of this page Eclipse plugin AddressBook sample missing a slot?
Author
Post « Previous Thread | Next Thread »
wildsalmon
Assistant


Registration Date: 14.04.2008
Posts: 2
Location: Seattle

Level: 4 [?]
Experience: 66
Next Level: 100

34 points of experience needed for next level

Fragezeichen Eclipse plugin AddressBook sample missing a slot? Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

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 time(s), it was last edited by wildsalmon: 14.04.2008 23:35.

14.04.2008 23:34 wildsalmon is offline Send an Email to wildsalmon Search for Posts by wildsalmon Add wildsalmon to your Buddy List
wildsalmon
Assistant


Registration Date: 14.04.2008
Posts: 2
Location: Seattle

Level: 4 [?]
Experience: 66
Next Level: 100

34 points of experience needed for next level

Thread Starter Thread Started by wildsalmon
RE: Eclipse plugin AddressBook sample missing a slot? Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

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 ....
15.04.2008 01:06 wildsalmon is offline Send an Email to wildsalmon Search for Posts by wildsalmon Add wildsalmon to your Buddy List
Tree Structure | Board Structure
Jump to:
Post New Thread Post Reply
Qt Forum - programming with C++ and Qt » QtForum.org » Qt » Qt Designer » Eclipse plugin AddressBook sample missing a slot?

views today: 5.974 | views yesterday: 12.104 | total views: 10.251.447


Klebekork Shop - Linux Shop - Kontaktanzeigen - Linux Forum -  SMS Gewinnspiel -  Hotels -  Stadtpläne -  Branchenbuch & Stadtplan

Branchenbuch Österreich - Branchenbuch Niederlande - Portugal Branchenverzeichnis - Spanien Branchenverzeichnis 
Telefonbuch - Branchenbuch Frankreich