[Qt-interest] gui qt project with a MainWindow ui and several QDockWidget ui.
navid navid
n_nnavid at yahoo.com
Sat Oct 31 21:22:18 CET 2009
----- Original Message ----
From: navid navid <n_nnavid at yahoo.com>
To: Sergei Stolyarov <sergei.stolyarov at regolit.com>
Sent: Sat, October 31, 2009 11:51:03 PM
Subject: Re: [Qt-interest] gui qt project with a MainWindow ui and several QDockWidget ui.
this is the code
//cpp
#include "dockwidget1.h"
#include "ui_dockwidget1.h"
DockWidget1::DockWidget1()
{
uidock = new Ui_Dock; // <- error: invalid use of undefined type `struct Ui_Dock'
uidock->setupUi(this); // <- error: invalid use of undefined type `struct Ui_Dock'
}
//h
#ifndef DOCKWIDGET1_H
#define DOCKWIDGET1_H
#include <QWidget>
QT_BEGIN_NAMESPACE
class Ui_Dock; // <- error: forward declaration of `struct Ui_Dock'
QT_END_NAMESPACE
class DockWidget1 : public QWidget
{
public:
DockWidget1();
private:
Ui_Dock *uidock;
};
#endif // DOCKWIDGET1_H
//ui
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DockWidget1</class>
<widget class="QDockWidget" name="DockWidget1">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>DockWidget1</string>
</property>
<widget class="QWidget" name="dockWidgetContents"/>
</widget>
<resources/>
<connections/>
</ui>
regards
nn
----- Original Message ----
From: Sergei Stolyarov <sergei.stolyarov at regolit.com>
To: qt-interest at trolltech.com
Sent: Sat, October 31, 2009 11:37:39 PM
Subject: Re: [Qt-interest] gui qt project with a MainWindow ui and several QDockWidget ui.
On Sunday 01 November 2009 01:12:46 navid navid wrote:
> please be informed that as i stated, i look for ui dependent ones (and there
is nothing after one hour search!)
> i have successful experience working with single MainWindow ui application,
but receive errors for the proposed ones:
>
> mydock1.h: error: forward declaration of `struct Ui_MyDock1'
> mydock1.cpp: error: invalid use of undefined type `struct Ui_MyDock1'
> ...
>
> thanks for new consideration
Are you trying to use dock from the Designer's .ui files? I.e. on file for
QMainWindow based class, and inside QDockWidget .ui based widget.
--
Best regards,
Sergei Stolyarov
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list