Hello Simon.

I'm starting to port my application (audio player) to PyKDE4. The
bindings compiled fine, but after the first steps I encountered that the
text in the menu bar and the menus themselves was not being displayed.

If you could try to reproduce, that'd be nice. I attach two minimal
programs, one in C++ and another in Python. I can see the "File" menu in
the C++ one, but in the Python one the menu is there, but the text is
missing. Does it happen to you too?

Thanks in advance,

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
                               Listening to: Compay Segundo - Desdichado
#include <KMainWindow>
#include <KApplication>
#include <KCmdLineArgs>
#include <KMenuBar>

class MainWindow : public KMainWindow
{
    public:
        MainWindow() { menuBar()->addMenu("&File"); }
        ~MainWindow() {}
};

int main(int argc, char *argv[])
{
    KCmdLineArgs::init(argc, argv, "test", 0, ki18n("test"), "1.0");
    KApplication app;
    MainWindow mw;
    mw.show();
    app.exec();
}
#! /usr/bin/env python

import sys

from PyKDE4 import kdeui, kdecore

class MainWindow(kdeui.KMainWindow):
    def __init__ (self, *args):
        kdeui.KMainWindow.__init__(self, *args)
        self.menuBar().addMenu('&File')

def main():
    kdecore.KCmdLineArgs.init(sys.argv, 'test', '', kdecore.ki18n('test'), '1.0')
    application = kdeui.KApplication()
    main_window = MainWindow()
    main_window.show()
    application.exec_()

if __name__ == '__main__':
    main()

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to