Q: Howto connect MultiLineEdit to mainview?

Sandy Meier smeier at kdevelop.org
Mon Oct 30 20:12:04 GMT 2000


On Son, 29 Okt 2000, you wrote:
>
> This is the current status:
>
>         1.) created new project using normal kde template
> 	    that includes standard menus and toolbar.
>
> 	2.) created GUI using dialog editor consisting of
> 	    two MultiLineEdit widgets (edit window, output window).
>
> 	3.) created source code for GUI creating widgetmain.h,
> 	    widgetmain.cpp and widgetmaindata.cpp
>
> 	4.) got stuck... what's next? :(
>
> The project currently consists of following files:
>
> test.h, testdoc.h, testview.h, resource.h, widgetmain.h, main.cpp,
> ktest.cpp, testdoc.cpp, testview.cpp, widgetmain.cpp,
> widgetmaindata.cpp

Hi!

By default the View inherits only QWidget.

(from testview.h)

class TestView : public QWidget  {
Q_OBJECT
  public:
    /** Constructor for the main view */
    TestView(QWidget *parent = 0, const char *name=0);


just change the declaration to: 
#include "widgetmain.h"
class TestView : public WidgetMain {

and the implementation to 
TestView::TestView(QWidget *parent, const char *name) : QWidgetMain(parent, 
name){

Should work. :-)

Ciao!
Sandy

-- 
email: smeier at kdevelop.org  ICQ: 27681958
the KDevelop project: http://www.kdevelop.org
--
"Solange es Schlachthäuser gibt, wird es auch Schlachtfelder geben." (Leo 
Tolstoi)




More information about the KDevelop mailing list