LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-05-2003, 05:02 AM   #1
schultzm
LQ Newbie
 
Registered: Sep 2003
Location: Münster, Germany
Distribution: suse 8.1
Posts: 4

Rep: Reputation: 0
Post Number of "connect"-commands limited (Qt/KDE-programming)?


Hi there,

I've a problem:
I tried to write a program using Qt. One of my dialogs (its a class derived from public KDialogBase) includes a number of QCheckBoxes. Each QCheckBox gets a QToolTip with the command QToolTip::add (). You can choose, wether all should be displayed, or not. (The QCheckBoxes are organized in seven packages you can choose for display.)

So far, so good. Everything works fine.

But it works only as long as I don't create 272 QCheckBoxes. Then, the program crashes.


-------------------------------
The crash-handler of KDE shows the following message:
[New Thread 1024 (LWP 1329)]
0x40b2e8c9 in wait4 () from /lib/libc.so.6
#0 0x40b2e8c9 in wait4 () from /lib/libc.so.6
#1 0x40ba9c90 in __DTOR_END__ () from /lib/libc.so.6
#2 0x400ef555 in KCrash::defaultCrashHandler(int) ()
from /opt/kde3/lib/libkdecore.so.4
#3 0x40d3f12b in pthread_sighandler () from /lib/libpthread.so.0
#4 <signal handler called>
#5 0x405c71b2 in QObject::connect(QObject const*, char const*, QObject const*, char const*) () from /usr/lib/libqt-mt.so.3
#6 0x406ddb86 in QTipManager::add(QRect const&, QWidget*, QRect const&, QString const&, QToolTipGroup*, QString const&, QToolTip*, bool) ()
from /usr/lib/libqt-mt.so.3
#7 0x406ddc24 in QTipManager::add(QWidget*, QRect const&, QString const&, QToolTipGroup*, QString const&, QToolTip*, bool) () from /usr/lib/libqt-mt.so.3
#8 0x406df59a in QToolTip::add(QWidget*, QString const&) ()
from /usr/lib/libqt-mt.so.3
#9 0x080776c1 in KartenWahlDialog::DistributeCheckBoxes(...)



-------------------------------
("KartenWahlDialog::DistributeCheckBoxes()" is my function.)


When I changed the functionality of my program, no longer using QToolTips but connect-commands instead, the program does exactly the same: Crashing, if I want to show all 272 possible QCheckBoxes, otherwise (~40 QCheckBoxes less) it works fine.

So I ask myself wether the number of "connect"-commands I can use is limited and when it is so, I can expand the limit.

By the way: If I disable the "QToolTip::add ()"-command, the 272 QCheckBoxes are shown without any problems.

For I need displaying the Tooltips if it's posiible, I ask YOU: Can anybody help me?

greetings

schultzm
 
Old 09-05-2003, 01:21 PM   #2
jinksys
Member
 
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 419

Rep: Reputation: 35
Can you include your code?
 
Old 09-06-2003, 09:05 AM   #3
schultzm
LQ Newbie
 
Registered: Sep 2003
Location: Münster, Germany
Distribution: suse 8.1
Posts: 4

Original Poster
Rep: Reputation: 0
Here is my code:

QCheckBox * KartenWahlDialog::DistributeCheckBoxes (const USHORT group,
const QString cardLabelText,
const QString cardTooltip,
const QString checkBoxName,
QButtonGroup * stadt,
QButtonGroup * gebiet, QButtonGroup * magie,
QButtonGroup * landschaft, QButtonGroup * strasse,
QButtonGroup * einheit, QButtonGroup * aktion,
QButtonGroup * ereignis)
{
QCheckBox * cardBox;
switch (group)
{
case GGRFLOTTE:
case GSTADTAUSBAU:
//cardBox = new QCheckBox (cardLabelText, stadt, checkBoxName);
return new QCheckBox (cardLabelText, stadt, checkBoxName);
break;
(... some more case...)
}


//Tooltip hinzufügen
QToolTip::add (cardBox, cardTooltip);
};

The function is called in a for-loop one time for each button which is to display.

Last edited by schultzm; 09-06-2003 at 09:08 AM.
 
Old 09-06-2003, 09:09 AM   #4
schultzm
LQ Newbie
 
Registered: Sep 2003
Location: Münster, Germany
Distribution: suse 8.1
Posts: 4

Original Poster
Rep: Reputation: 0
Can it be just a problem with my memory?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
commands "init" and "modprobe" not working Diagmato Fedora 2 07-22-2005 11:44 PM
KDE "Logout" and "Lock Session" menu restoration powah Linux - Software 3 03-29-2005 08:02 PM
what is difference between "reset" and "clean " commands? zameer_india Linux - Newbie 2 01-10-2005 06:23 AM
How to start KDE automaticlly without typing "startx" then "startkde" Jonescity Slackware 8 10-29-2004 09:32 PM
"depmod" and "modprobe" commands don't work The1PatO Fedora 7 06-10-2004 12:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration