Typo from me when posting here, the error was: 'statusBar' undeclared (first use this function). Thanks a lot, it is working now. Code: Source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #include <kstatusbar.h> #include "app.h" appView::appView(QWidget *parent, const char *name) : CentralViewBase(parent, name) { ... } /// Display the text on the statusbar void appView::changeStatusbar(const QString& text) { KMainWindow *mw = dynamic_cast<KMainWindow *>(parent()); if ( !mw->statusBar()->...
Quoted Originally posted by wysota or use appView::parent() to reveal the method. Ok, closer ... error is now: 'StatusBar' undeclared (first use this function)
I get error: cannot dynamic_cast 'parent' (of type 'class QWidget*') to typw 'struct KMainWindow*' (target is not pointer or reference to complete type) 'StatusBar' undeclared (first use this function) Tried signal/slot, but it is lagging.
I get "error: 'parent' cannot be used as parent". Doing this: Source code 1 2 3 4 5 6 appView::appView(QWidget *parent, const char *name) : CentralViewBase(parent, name) { KMainWindow *mw = dynamic_cast<KMainWindow *>(parent()); mw->statusBar()->message(i18n("Done")); }
Hi! I have a KMainWindow and inside a widget created in QT Designer which is then subclassed. Is it possible to access KMainWindow slots like in: parent->statusBar()->message(i18n("Done")); Source code 1 2 3 4 5 app::app() : KMainWindow( 0, "myApp" ) { m_view = new appView(this); setCentralWidget(m_view); } Source code 1 2 3 4 5 appView::appView(QWidget *parent, const char *name) : CentralViewBase(parent, name) { parent->statusBar()->message(i18n("Done")); }
Hi! I'm a bit confused by all the choices in KDE. My app has icons for listView items and systemTray. Sizes are 16, 22 and 32. Is this th correct way of loading icon for systray (size 32): Source code 1 2 KIconLoader *ldr = KGlobal::iconLoader(); pxKuroo = ldr->loadIcon("kuroo", KIcon::NoGroup, KIcon::SizeSmallMedium, KIcon::DefaultState, NULL, true); and this for listView items (size 16): Source code 1 pxPackage = ldr->loadIcon("kuroo_package", KIcon::NoGroup, KIcon::SizeSmall, KIcon::DefaultSt...
So if I start myApp, then call upp kdesu and prompt user with it. Will the started myApp switch from being by user to being run by root?
My app needs root privileges for some actions. How is it possible to open upp kdesu when the app start and afterwards the app should continue running as root? Thanks for any answer!
Oh lala! Sounds complicated... Quoted Originally posted by wysota If it really is a child process, you should get a SIGCHLD posix signal when the child process ends (not to be confused with Qt signals of course). There is a way to do the thing with quitting the application and then reconnecting - you need another app, that will be a controller of theese child processes. You don't fork theese from your "monitor" app, but from the controller one.... It has to run during the life of all children an...