Home » Community » Newbie corner » Custom Control
Custom Control [message #27587] |
Sat, 24 July 2010 18:18 |
jeremy_c
Messages: 175 Registered: August 2007 Location: Ohio, USA
|
Experienced Member |
|
|
Hello,
I've created a custom control and have the chicken/egg problem I think. My new control uses a layout. Thus, I have created a new layout in my main applications .lay file named DxccLayout.
I then created DxccWidget.h and DxccWidget.cpp files. The .h file currently looks like:
#ifndef _SmartLog_DxccWidget_h_
#define _SmartLog_DxccWidget_h_
class DxccWidget : public WithDxccWidgetLayout<ParentCtrl>
{
private:
public:
typedef DxccWidget CLASSNAME;
DxccWidget();
};
#endif
My main window uses this widget. So, the problem is that the layout file will not compile because it does not know about the custom control DxccWidget. When I include DxccWidget.h before the layout file, it fails to compile as it will not compile without knowing about the DxccLayout defined in the .lay file.
How is this normally handled?
Jeremy
|
|
|
|
Re: Custom Control [message #27611 is a reply to message #27587] |
Sun, 25 July 2010 21:03 |
jeremy_c
Messages: 175 Registered: August 2007 Location: Ohio, USA
|
Experienced Member |
|
|
Thanks. I didn't realize I'd have to create different layouts, however, that's fine. Easy enough to do and decouples the control from the app a bit.
Jeremy
|
|
|
Goto Forum:
Current Time: Fri Sep 20 08:08:03 CEST 2024
Total time taken to generate the page: 0.03203 seconds
|