[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-edu-devel
Subject:    [kde-edu-devel] KPopupMenu on QPushButton in kmessedword
From:       Sebastian Stein <s5228 () informatik ! htw-dresden ! de>
Date:       2002-07-15 12:40:55
[Download RAW message or body]

Hi,

it is driving me crazy. I want to add the standard KDE Helpmenu as popup
menu to the help button in my main window of KBruch.

I looked at KMessedWords and there it seems to work. So I took the example
and tried:

helpBtn = new QPushButton(i18n("&Help"), this);
KHelpMenu * helpMenu = new KHelpMenu(this,
               KGlobal::instance()->aboutData(), true);
helpBtn->setPopup(helpMenu->menu());

helpBtn is a QPushButton defined in my class definition.

If I try to compile this I get the following error:

gui_qt.cpp: In method `gui_qt::gui_qt(QWidget * = 0, const char * = 0)':
gui_qt.cpp:58: no matching function for call to `QPushButton::setPopup
(KPopupMenu *)'
/usr/lib/qt-3.0.3/include/qpushbutton.h:95: candidates are: void
QPushButton::setPopup(QPopupMenu *)

Yes, I understand the problem, the compiler needs an overloaded function to
add a KPopupMenu, but where is this function defined? And why does it work
in kmessedwords?

I have commited the version with the bug to cvs so that you can checkout it
and maybe help me. The problem is in gui_qt.h and gui_qt.cpp
(kdenonbeta/kbruch).

Thanks in advance,

Steinchen
-- 
http://www.hpfsc.de/ - die Seite rund um:
Assembler, Bundeswehr, TFT LCDs, Halle/Saale, Fahrradtouren,
Wanderstaat Mauma, Raumschiff USS Nathan, Enemy Room, MLCAD Tutorial
_______________________________________________
kde-edu-devel mailing list
kde-edu-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-edu-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic