[Kde-bindings] Qyoto - adding QTextEdit as centralWidget does not end app on closing main window

Dimitar Dobrev dpldobrev at yahoo.com
Tue Jan 31 11:53:30 UTC 2012


Hi,

I do not have a guess where the problem is but there are a few things you could try:

1. Run the program like "MONO_LOG_LEVEL=Debug mono <path_to_exe>" and check if there is anything useful written to the console;
2. Debug the program with gdb and check the console.

I'll take a look your example later (in the evening, probably) but on Windows because my Linux is still not set up.



________________________________
 From: Cvetoslav Ludmiloff <ludmiloff at gmail.com>
To: kde-bindings at kde.org 
Sent: Tuesday, January 31, 2012 1:34 PM
Subject: [Kde-bindings] Qyoto - adding QTextEdit as centralWidget does not end app on closing main window
 

Hi all,
I'm writing a small example program for Qyoto c# bindings like this 
main_window.cs:


using System;
using Qyoto;

namespace ТextЕd
{
public class MainWindow : QMainWindow
{
public QTextEdit editor;
public MainWindow() : base()
{
SetupEditor();
SetCentralWidget(editor);
}
private void SetupEditor()
{
editor = new QTextEdit();
}
protected override void OnCloseEvent(QCloseEvent ev)
{
Console.WriteLine("On close event");
ev.Accept();
}
}
}


and main.cs like this:

using System;
using Qyoto;

namespace ТextЕd
{
public class TextEdMain 
{
public static int Main(String[] args)
{
new QApplication(args);
MainWindow w = new MainWindow();
w.Show();
return QApplication.Exec();
//Console.WriteLine("exiting");
//return 0;
}
}
}


setting QTextEdit as central widget cause the application to not exit on window close.
I can see OnCloseEvent is executed, but application does not return to command line.
setting QPushButton works as usual and application exits on window close. 

Everything smoke etc. is compiled ok from source according to Dimitar Dobrev suggestions;
Ubuntu 11.04 32bit, Qt 4.7.2

The same example, written in Python + PyQt4 works like a charm,

Whats wrong, how can I fix this.

Regards
Cvetoslav Ludmiloff
http://archstable.blogspot.com/
_______________________________________________
Kde-bindings mailing list
Kde-bindings at kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20120131/5d0f635e/attachment.html>


More information about the Kde-bindings mailing list