Results 1 to 2 of 2

Thread: QT+error

  1. #1
    Join Date
    Jul 2007
    Location
    BY.Minsk
    Posts
    90
    Thanks
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default QT+error

    I place the button on the form, I click 2 times on it, and I receive a mistake:


    Qt Code:
    1. #ifndef UI_HSM_H
    2. #define UI_HSM_H
    3.  
    4. #include <QtCore/QVariant>
    5. #include <QtGui/QAction>
    6. #include <QtGui/QApplication>
    7. #include <QtGui/QButtonGroup>
    8. #include <QtGui/QDialog>
    9. #include <QtGui/QPushButton>
    10.  
    11. class Ui_HSMClass
    12. {
    13. public:
    14. QPushButton *pushButton;
    15.  
    16. void setupUi(QDialog *HSMClass)
    17. {
    18. if (HSMClass->objectName().isEmpty())
    19. HSMClass->setObjectName(QString::fromUtf8("HSMClass"));
    20. HSMClass->setWindowModality(Qt::ApplicationModal);
    21. QSize size(762, 517);
    22. size = size.expandedTo(HSMClass->minimumSizeHint());
    23. HSMClass->resize(size);
    24. HSMClass->setContextMenuPolicy(Qt::NoContextMenu);
    25. pushButton = new QPushButton(HSMClass);
    26. pushButton->setObjectName(QString::fromUtf8("pushButton"));
    27. pushButton->setGeometry(QRect(80, 140, 75, 24));
    28.  
    29. retranslateUi(HSMClass);
    30.  
    31. QMetaObject::connectSlotsByName(HSMClass);
    32. } // setupUi
    33.  
    34. void retranslateUi(QDialog *HSMClass)
    35. {
    36. HSMClass->setWindowTitle(QApplication::translate("HSMClass", "HSM", 0, QApplication::UnicodeUTF8));
    37. pushButton->setText(QApplication::translate("HSMClass", "PushButton", 0, QApplication::UnicodeUTF8));
    38. Q_UNUSED(HSMClass);
    39. } // retranslateUi
    40.  
    41. };
    42.  
    43. namespace Ui {
    44. class HSMClass: public Ui_HSMClass {};
    45. } // namespace Ui
    46.  
    47. #endif // UI_HSM_H
    To copy to clipboard, switch view to plain text mode 


  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QT+error

    This is no error. It means that you do not have any class in the back that represents this form. This means the class that inherits from the generated UI class or contains a member of the UI class.

    Once you add that class, double clicking on the button in form design will automatically create a slot in that class connected to the button's clicked signal.

    So, create that class and the problem will go away.

    Regards

Similar Threads

  1. Installation on Fedora Core 4
    By jcr in forum Installation and Deployment
    Replies: 3
    Last Post: 29th January 2009, 01:34
  2. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19
  3. Qt-x11-commercial-src-4.2.0-snapshot-20060824 error
    By DevObject in forum Installation and Deployment
    Replies: 4
    Last Post: 24th August 2006, 23:31
  4. use qpsql
    By raphaelf in forum Installation and Deployment
    Replies: 34
    Last Post: 22nd August 2006, 12:52
  5. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 12:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.