Russian Qt Forum
Май 11, 2024, 00:52 *
Добро пожаловать, Гость. Пожалуйста, войдите или зарегистрируйтесь.
Вам не пришло письмо с кодом активации?

Войти
 
  Начало   Форум  WIKI (Вики)FAQ Помощь Поиск Войти Регистрация  

Страниц: [1]   Вниз
  Печать  
Автор Тема: Вопрос по поводу конструктора  (Прочитано 2730 раз)
genikoff
Гость
« : Ноябрь 03, 2016, 13:35 »

Здравствуйте,проблемка одна образовалась.В общем есть у меня класс ReportMogilev.Прикрепляю .h файл с его инициализацией.
Код:
class Ui_ReportMogilev
{
public:
    QTableView *tableViewReportMogilev;
    QPushButton *exportButton;

    void setupUi(QWidget *ReportMogilev)
    {
        if (ReportMogilev->objectName().isEmpty())
            ReportMogilev->setObjectName(QString::fromUtf8("ReportMogilev"));
        ReportMogilev->resize(832, 596);
        tableViewReportMogilev = new QTableView(ReportMogilev);
        tableViewReportMogilev->setObjectName(QString::fromUtf8("tableViewReportMogilev"));
        tableViewReportMogilev->setGeometry(QRect(10, 10, 801, 541));
        exportButton = new QPushButton(ReportMogilev);
        exportButton->setObjectName(QString::fromUtf8("exportButton"));
        exportButton->setGeometry(QRect(20, 560, 91, 23));

        retranslateUi(ReportMogilev);

        QMetaObject::connectSlotsByName(ReportMogilev);
    } // setupUi

    void retranslateUi(QWidget *ReportMogilev)
    {
        ReportMogilev->setWindowTitle(QApplication::translate("ReportMogilev", "ReportMogilev", 0, QApplication::UnicodeUTF8));
        exportButton->setText(QApplication::translate("ReportMogilev", "\320\255\320\272\321\201\320\277\320\276\321\200\321\202 \320\262 Excel", 0, QApplication::UnicodeUTF8));
    } // retranslateUi

};

namespace Ui {
    class ReportMogilev: public Ui_ReportMogilev {};
} // namespace Ui
Так вот,когда я запускаюсь в режиме отладки все хорошо,но как только я выбираю Release, то в процессе компиляции,у меня название класса заменяется на Form.вот код
Код:
class Ui_Form
{
public:
    QTableView *tableViewReportMogilev;
    QPushButton *exportButton;

    void setupUi(QWidget *Form)
    {
        if (Form->objectName().isEmpty())
            Form->setObjectName(QString::fromUtf8("Form"));
        Form->resize(832, 596);
        tableViewReportMogilev = new QTableView(Form);
        tableViewReportMogilev->setObjectName(QString::fromUtf8("tableViewReportMogilev"));
        tableViewReportMogilev->setGeometry(QRect(10, 10, 801, 541));
        exportButton = new QPushButton(Form);
        exportButton->setObjectName(QString::fromUtf8("exportButton"));
        exportButton->setGeometry(QRect(20, 560, 91, 23));

        retranslateUi(Form);

        QMetaObject::connectSlotsByName(Form);
    } // setupUi

    void retranslateUi(QWidget *Form)
    {
        Form->setWindowTitle(QApplication::translate("Form", "Form", 0, QApplication::UnicodeUTF8));
        exportButton->setText(QApplication::translate("Form", "\320\255\320\272\321\201\320\277\320\276\321\200\321\202 \320\262 Excel", 0, QApplication::UnicodeUTF8));
    } // retranslateUi

};

namespace Ui {
    class Form: public Ui_Form {};
} // namespace Ui
Вот может есть у кого какие мысли по этому поводу???
Записан
__Heaven__
Джедай : наставник для всех
*******
Offline Offline

Сообщений: 2130



Просмотр профиля
« Ответ #1 : Ноябрь 03, 2016, 15:24 »

ide и лог сборки был бы кстати
Записан
lit-uriy
Джедай : наставник для всех
*******
Offline Offline

Сообщений: 3880


Просмотр профиля WWW
« Ответ #2 : Ноябрь 05, 2016, 12:38 »

>>Прикрепляю .h файл с его инициализацией.
от h-файла не горячё и не холодно, т.к. это генерируемый файл.
прикрепи ui-файл
Записан

Юра.
genikoff
Гость
« Ответ #3 : Ноябрь 22, 2016, 13:32 »

Все,разобрался.Проблема была в UI-файле.Я когда его создавал не заменил Form на ReportMogilev.Всем спасибо
Записан
Страниц: [1]   Вверх
  Печать  
 
Перейти в:  


Страница сгенерирована за 0.057 секунд. Запросов: 23.