Mailinglist Archive: libyui-devel (8 mails)

< Previous Next >
[libyui-devel] Problem in displaying GUI after "deleteChildren()"
Hello

I’m issue some troubles with libyui. I’m build up some ui, clear part of it
using «deleteChildren()» method of one of my widgets and build another part of
ui down from this widget. At first I have good working ui, but after above
actions no any ui displayed. I’m check it on openSUSE 12.3 official and custom
build libyui 3.0.10 with Qt and NCurses interface plugins - all the same. But
with gtk interface plugin in openSUSE 12.3 all works fine. In some rare cases
with same technique I got working interface in ncurses but not working Qt.

There is a sample code:

#include "YUI.h"
#include "YWidgetFactory.h"
#include "YDialog.h"
#include "YLayoutBox.h"
#include "YSpacing.h"
#include "YLabel.h"
#include "YPushButton.h"
#include "YEvent.h"
#include "YDialogSpy.h"

int main(int argc, char **argv)
{

/*****************************************************************************************/
auto mainDialog = YUI::widgetFactory()->createMainDialog();

auto mainVBox = YUI::widgetFactory()->createVBox(mainDialog);
auto mainLabel = YUI::widgetFactory()->createLabel(mainVBox, "Hello
world!");
YUI::widgetFactory()->createVSpacing(mainVBox);
auto mainButton = YUI::widgetFactory()->createPushButton(mainVBox,
"Close");

mainDialog->pollEvent();
YDialogSpy::showDialogSpy();

while (true) {
auto event = mainDialog->waitForEvent();
if (event)
if (event->eventType() == YEvent::CancelEvent || event->widget() ==
mainButton)
break;
}

mainDialog->deleteChildren();

/*****************************************************************************************/
mainVBox = YUI::widgetFactory()->createVBox(mainDialog);
mainLabel = YUI::widgetFactory()->createLabel(mainVBox, "Hello world
#2!");
YUI::widgetFactory()->createVSpacing(mainVBox);
mainButton = YUI::widgetFactory()->createPushButton(mainVBox, "Close #2");

mainDialog->pollEvent();
YDialogSpy::showDialogSpy();

while (true) {
auto event = mainDialog->waitForEvent();
if (event)
if (event->eventType() == YEvent::CancelEvent || event->widget() ==
mainButton)
break;
}

mainDialog->destroy();
return 0;
}

--
To unsubscribe, e-mail: libyui-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: libyui-devel+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation
Follow Ups