[Qt-creator] main.cpp errors
Heena Mahur
hena18 at rocketmail.com
Mon Jun 25 12:04:34 CEST 2012
please have a look at ui_ptedit_1.h
#include <kdialog.h>
#include <klocale.h>
/********************************************************************************
** Form generated from reading UI file 'ptedit_1.ui'
**
** Created: Fri Jun 22 12:21:15 2012
** by: Qt User Interface Compiler version 4.8.1
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_PTEDIT_1_H
#define UI_PTEDIT_1_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QCommandLinkButton>
#include <QtGui/QDialogButtonBox>
#include <QtGui/QGroupBox>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QLabel>
#include <QtGui/QMainWindow>
#include <QtGui/QMenu>
#include <QtGui/QMenuBar>
#include <QtGui/QScrollBar>
#include <QtGui/QSplitter>
#include <QtGui/QStatusBar>
#include <QtGui/QVBoxLayout>
#include <QtGui/QWidget>
#include "kcombobox.h"
#include "kicondialog.h"
#include "klineedit.h"
#include "kpushbutton.h"
#include "kseparator.h"
#include "kurlrequester.h"
#include "kcheckcombobox.h"
QT_BEGIN_NAMESPACE
class Ui_ptedit
{
public:
QAction *action_New;
QAction *action_Save;
QAction *action_Exit;
QAction *action_exit;
QAction *action_cut;
QAction *action_copy;
QAction *action_paste;
QAction *action_about;
QAction *action_about_Qt;
QAction *action_open_file;
QAction *action_upload;
QWidget *centralwidget;
QWidget *horizontalLayoutWidget;
QHBoxLayout *horizontalLayout;
QWidget *widget;
QWidget *widget_2;
QLabel *label;
QLabel *label_2;
KSeparator *kseparator;
QSplitter *splitter;
KPIM::KCheckComboBox *kpim__kcheckcombobox;
QDialogButtonBox *buttonBox;
QSplitter *splitter_2;
KUrlRequester *exporterUrl;
KPushButton *exporterButton;
QCommandLinkButton *commandLinkButton;
QGroupBox *groupBox;
KSeparator *kseparator_2;
KSeparator *kseparator_3;
QWidget *verticalLayoutWidget;
QVBoxLayout *verticalLayout;
KIconButton *kiconbutton;
QGroupBox *groupBox_2;
KSeparator *kseparator_4;
QScrollBar *verticalScrollBar_3;
KLineEdit *klineedit;
QScrollBar *horizontalScrollBar;
QScrollBar *verticalScrollBar;
QLabel *label_3;
QScrollBar *horizontalScrollBar_2;
QScrollBar *verticalScrollBar_2;
QScrollBar *horizontalScrollBar_3;
QSplitter *splitter_3;
QMenuBar *menubar;
QMenu *menu_File;
QMenu *menu_Edit;
QMenu *menu_help;
QMenu *menu_upload;
QStatusBar *statusbar;
void setupUi(QMainWindow *MainWindow)
{
if (MainWindow->objectName().isEmpty())
MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
MainWindow->resize(792, 600);
MainWindow->setProperty("widget", QVariant(true));
action_New = new QAction(MainWindow);
action_New->setObjectName(QString::fromUtf8("action_New"));
action_Save = new QAction(MainWindow);
action_Save->setObjectName(QString::fromUtf8("action_Save"));
action_Exit = new QAction(MainWindow);
action_Exit->setObjectName(QString::fromUtf8("action_Exit"));
action_exit = new QAction(MainWindow);
action_exit->setObjectName(QString::fromUtf8("action_exit"));
action_cut = new QAction(MainWindow);
action_cut->setObjectName(QString::fromUtf8("action_cut"));
action_copy = new QAction(MainWindow);
action_copy->setObjectName(QString::fromUtf8("action_copy"));
action_paste = new QAction(MainWindow);
action_paste->setObjectName(QString::fromUtf8("action_paste"));
action_about = new QAction(MainWindow);
action_about->setObjectName(QString::fromUtf8("action_about"));
action_about_Qt = new QAction(MainWindow);
action_about_Qt->setObjectName(QString::fromUtf8("action_about_Qt"));
action_open_file = new QAction(MainWindow);
action_open_file->setObjectName(QString::fromUtf8("action_open_file"));
action_upload = new QAction(MainWindow);
action_upload->setObjectName(QString::fromUtf8("action_upload"));
centralwidget = new QWidget(MainWindow);
centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
horizontalLayoutWidget = new QWidget(centralwidget);
horizontalLayoutWidget->setObjectName(QString::fromUtf8("horizontalLayoutWidget"));
horizontalLayoutWidget->setGeometry(QRect(200, 10, 251, 531));
horizontalLayout = new QHBoxLayout(horizontalLayoutWidget);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
horizontalLayout->setSizeConstraint(QLayout::SetNoConstraint);
horizontalLayout->setContentsMargins(0, 0, 0, 0);
widget = new QWidget(horizontalLayoutWidget);
widget->setObjectName(QString::fromUtf8("widget"));
widget_2 = new QWidget(widget);
widget_2->setObjectName(QString::fromUtf8("widget_2"));
widget_2->setGeometry(QRect(0, 0, 241, 231));
label = new QLabel(widget_2);
label->setObjectName(QString::fromUtf8("label"));
label->setGeometry(QRect(60, 0, 181, 21));
label->setMinimumSize(QSize(0, 15));
label_2 = new QLabel(widget_2);
label_2->setObjectName(QString::fromUtf8("label_2"));
label_2->setGeometry(QRect(20, 100, 211, 31));
kseparator = new KSeparator(widget_2);
kseparator->setObjectName(QString::fromUtf8("kseparator"));
kseparator->setGeometry(QRect(0, 90, 251, 16));
splitter = new QSplitter(widget_2);
splitter->setObjectName(QString::fromUtf8("splitter"));
splitter->setGeometry(QRect(30, 20, 156, 48));
splitter->setOrientation(Qt::Vertical);
kpim__kcheckcombobox = new KPIM::KCheckComboBox(splitter);
kpim__kcheckcombobox->setObjectName(QString::fromUtf8("kpim__kcheckcombobox"));
splitter->addWidget(kpim__kcheckcombobox);
buttonBox = new QDialogButtonBox(splitter);
buttonBox->setObjectName(QString::fromUtf8("buttonBox"));
buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
splitter->addWidget(buttonBox);
splitter_2 = new QSplitter(widget_2);
splitter_2->setObjectName(QString::fromUtf8("splitter_2"));
splitter_2->setGeometry(QRect(40, 130, 149, 47));
splitter_2->setOrientation(Qt::Vertical);
exporterUrl = new KUrlRequester(splitter_2);
exporterUrl->setObjectName(QString::fromUtf8("exporterUrl"));
splitter_2->addWidget(exporterUrl);
exporterButton = new KPushButton(splitter_2);
exporterButton->setObjectName(QString::fromUtf8("exporterButton"));
splitter_2->addWidget(exporterButton);
commandLinkButton = new QCommandLinkButton(widget);
commandLinkButton->setObjectName(QString::fromUtf8("commandLinkButton"));
commandLinkButton->setGeometry(QRect(40, 480, 168, 41));
groupBox = new QGroupBox(widget);
groupBox->setObjectName(QString::fromUtf8("groupBox"));
groupBox->setGeometry(QRect(10, 260, 231, 171));
kseparator_2 = new KSeparator(widget);
kseparator_2->setObjectName(QString::fromUtf8("kseparator_2"));
kseparator_2->setGeometry(QRect(0, 220, 251, 16));
kseparator_3 = new KSeparator(widget);
kseparator_3->setObjectName(QString::fromUtf8("kseparator_3"));
kseparator_3->setGeometry(QRect(10, 460, 241, 20));
horizontalLayout->addWidget(widget);
verticalLayoutWidget = new QWidget(centralwidget);
verticalLayoutWidget->setObjectName(QString::fromUtf8("verticalLayoutWidget"));
verticalLayoutWidget->setGeometry(QRect(460, 10, 311, 531));
verticalLayout = new QVBoxLayout(verticalLayoutWidget);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
verticalLayout->setContentsMargins(0, 0, 0, 0);
kiconbutton = new KIconButton(verticalLayoutWidget);
kiconbutton->setObjectName(QString::fromUtf8("kiconbutton"));
verticalLayout->addWidget(kiconbutton);
groupBox_2 = new QGroupBox(verticalLayoutWidget);
groupBox_2->setObjectName(QString::fromUtf8("groupBox_2"));
kseparator_4 = new KSeparator(groupBox_2);
kseparator_4->setObjectName(QString::fromUtf8("kseparator_4"));
kseparator_4->setGeometry(QRect(0, 20, 301, 16));
verticalScrollBar_3 = new QScrollBar(groupBox_2);
verticalScrollBar_3->setObjectName(QString::fromUtf8("verticalScrollBar_3"));
verticalScrollBar_3->setGeometry(QRect(300, 0, 16, 461));
verticalScrollBar_3->setOrientation(Qt::Vertical);
verticalLayout->addWidget(groupBox_2);
klineedit = new KLineEdit(verticalLayoutWidget);
klineedit->setObjectName(QString::fromUtf8("klineedit"));
verticalLayout->addWidget(klineedit);
horizontalScrollBar = new QScrollBar(centralwidget);
horizontalScrollBar->setObjectName(QString::fromUtf8("horizontalScrollBar"));
horizontalScrollBar->setGeometry(QRect(0, 540, 811, 20));
horizontalScrollBar->setOrientation(Qt::Horizontal);
verticalScrollBar = new QScrollBar(centralwidget);
verticalScrollBar->setObjectName(QString::fromUtf8("verticalScrollBar"));
verticalScrollBar->setGeometry(QRect(780, 0, 16, 561));
verticalScrollBar->setOrientation(Qt::Vertical);
label_3 = new QLabel(centralwidget);
label_3->setObjectName(QString::fromUtf8("label_3"));
label_3->setGeometry(QRect(20, 10, 151, 491));
horizontalScrollBar_2 = new QScrollBar(centralwidget);
horizontalScrollBar_2->setObjectName(QString::fromUtf8("horizontalScrollBar_2"));
horizontalScrollBar_2->setGeometry(QRect(-10, 520, 201, 20));
horizontalScrollBar_2->setOrientation(Qt::Horizontal);
verticalScrollBar_2 = new QScrollBar(centralwidget);
verticalScrollBar_2->setObjectName(QString::fromUtf8("verticalScrollBar_2"));
verticalScrollBar_2->setGeometry(QRect(170, 10, 16, 511));
verticalScrollBar_2->setOrientation(Qt::Vertical);
horizontalScrollBar_3 = new QScrollBar(centralwidget);
horizontalScrollBar_3->setObjectName(QString::fromUtf8("horizontalScrollBar_3"));
horizontalScrollBar_3->setGeometry(QRect(450, 500, 331, 16));
horizontalScrollBar_3->setOrientation(Qt::Horizontal);
splitter_3 = new QSplitter(centralwidget);
splitter_3->setObjectName(QString::fromUtf8("splitter_3"));
splitter_3->setGeometry(QRect(0, 0, 0, 0));
splitter_3->setOrientation(Qt::Vertical);
MainWindow->setCentralWidget(centralwidget);
menubar = new QMenuBar(MainWindow);
menubar->setObjectName(QString::fromUtf8("menubar"));
menubar->setGeometry(QRect(0, 0, 792, 21));
menu_File = new QMenu(menubar);
menu_File->setObjectName(QString::fromUtf8("menu_File"));
menu_Edit = new QMenu(menubar);
menu_Edit->setObjectName(QString::fromUtf8("menu_Edit"));
menu_help = new QMenu(menubar);
menu_help->setObjectName(QString::fromUtf8("menu_help"));
menu_upload = new QMenu(menubar);
menu_upload->setObjectName(QString::fromUtf8("menu_upload"));
MainWindow->setMenuBar(menubar);
statusbar = new QStatusBar(MainWindow);
statusbar->setObjectName(QString::fromUtf8("statusbar"));
MainWindow->setStatusBar(statusbar);
menubar->addAction(menu_File->menuAction());
menubar->addAction(menu_Edit->menuAction());
menubar->addAction(menu_help->menuAction());
menubar->addAction(menu_upload->menuAction());
menu_File->addSeparator();
menu_File->addSeparator();
menu_File->addSeparator();
menu_File->addAction(action_open_file);
menu_Edit->addAction(action_paste);
menu_help->addAction(action_about);
menu_upload->addAction(action_upload);
retranslateUi(MainWindow);
QMetaObject::connectSlotsByName(MainWindow);
} // setupUi
void retranslateUi(QMainWindow *MainWindow)
{
MainWindow->setWindowTitle(tr2i18n("MainWindow", 0));
action_New->setText(tr2i18n("&New", 0));
action_Save->setText(tr2i18n("&Save", 0));
action_Exit->setText(tr2i18n("&save as", 0));
action_exit->setText(tr2i18n("&exit", 0));
action_cut->setText(tr2i18n("&cut", 0));
action_copy->setText(tr2i18n("©", 0));
action_paste->setText(tr2i18n("&save", 0));
action_about->setText(tr2i18n("&try", 0));
action_about_Qt->setText(tr2i18n("&about Qt", 0));
action_open_file->setText(tr2i18n("&open file", 0));
action_upload->setText(tr2i18n("&upload", 0));
label->setText(tr2i18n("Select a widget :", 0));
label_2->setText(tr2i18n("Export file :Choose a target file .", 0));
kpim__kcheckcombobox->clear();
kpim__kcheckcombobox->insertItems(0, QStringList()
<< tr2i18n("Dock widget", 0)
<< tr2i18n("tab widget", 0)
<< tr2i18n("list widget", 0)
<< tr2i18n("tree widget", 0)
<< tr2i18n("table widget", 0)
<< tr2i18n("group box", 0)
<< tr2i18n("scroll area", 0)
<< tr2i18n("tab widget", 0)
<< tr2i18n("stacked widget", 0)
<< tr2i18n("widget", 0)
);
exporterButton->setText(tr2i18n("Export current project", 0));
commandLinkButton->setText(tr2i18n("Go back", 0));
groupBox->setTitle(tr2i18n("Working on .......", 0));
kiconbutton->setText(tr2i18n("Go !", 0));
groupBox_2->setTitle(tr2i18n("Help content ", 0));
klineedit->setText(tr2i18n("Help area..../...", 0));
label_3->setText(tr2i18n(" XML tree", 0));
menu_File->setTitle(tr2i18n("&open", 0));
menu_Edit->setTitle(tr2i18n("&save", 0));
menu_help->setTitle(tr2i18n("&try", 0));
menu_upload->setTitle(tr2i18n("&upload", 0));
} // retranslateUi
};
namespace Ui {
class ptedit: public Ui_ptedit {};
} // namespace Ui
QT_END_NAMESPACE
#endif // PTEDIT_1_H
________________________________
From: Orgad and Raizel Shaneh <orgads at gmail.com>
To: Heena Mahur <hena18 at rocketmail.com>
Sent: Monday, 25 June 2012 3:14 PM
Subject: Re: [Qt-creator] main.cpp errors
ui_ptedit.h should not be edited at all. You should edit ptedit.ui.
- Orgad
On Mon, Jun 25, 2012 at 12:43 PM, Heena Mahur <hena18 at rocketmail.com> wrote:
shall I replace MainWindow to ptedit everywhere in ui_ptedit..h?
>
>
>
>________________________________
> From: Orgad and Raizel Shaneh <orgads at gmail.com>
>To: Heena Mahur <hena18 at rocketmail.com>
>Sent: Monday, 25 June 2012 3:11 PM
>
>Subject: Re: [Qt-creator] main.cpp errors
>
>
>
>Look like you're missing #include <QMainWindow> somewhere.
>
>
>- Orgad
>
>
>On Mon, Jun 25, 2012 at 12:40 PM, Heena Mahur <hena18 at rocketmail.com> wrote:
>
>hey,
>>thanks
>>I am now getting these errors
>>
>>
>>/home/heena/build/main.cpp: In function ‘int main(int, char**)’:
>>/home/heena/build/main.cpp:12:18: error: invalid conversion from ‘QWidget*’ to ‘QMainWindow*’ [-fpermissive]
>>/home/heena/build/ui_ptedit_1.h:97:10: error: initializing argument 1 of ‘void Ui_ptedit::setupUi(QMainWindow*)’ [-fpermissive]
>>
>>
>>
>>________________________________
>> From: Orgad and Raizel Shaneh <orgads at gmail.com>
>>To: Heena Mahur <hena18 at rocketmail.com>
>>Sent: Monday, 25 June 2012 3:05 PM
>>
>>Subject: Re: [Qt-creator] main.cpp errors
>>
>>
>>
>>Well, not in the h file you included. You can rename the form if you want.
>>
>>
>>- Orgad
>>
>>
>>On Mon, Jun 25, 2012 at 12:32 PM, Heena Mahur <hena18 at rocketmail.com> wrote:
>>
>>main.cpp? no, it is Ui::ptedit ui;
>>>
>>>
>>>________________________________
>>> From: Orgad and Raizel Shaneh <orgads at gmail.com>
>>>To: Heena Mahur <hena18 at rocketmail.com>
>>>Sent: Monday, 25 June 2012 3:00 PM
>>>
>>>Subject: Re: [Qt-creator] main.cpp errors
>>>
>>>
>>>
>>>That's because it is named Ui::MainWindow, not Ui::ptedit.
>>>
>>>
>>>- Orgad
>>>
>>>
>>>
>>>>>QT_BEGIN_NAMESPACE
>>>>>
>>>>>class Ui_MainWindow
>>>>>{
>>...
>>};
>>>>>
>>>>>namespace Ui {
>>>>> class MainWindow: public Ui_MainWindow {};
>>>>>} // namespace
Ui
>>>>>
>>>>>QT_END_NAMESPACE
>>>>>
>>>>>#endif // PTEDIT_1_H
>>>>>
>>>>>
>>
>>
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20120625/d5d52553/attachment.html>
More information about the Qt-creator
mailing list