Re: combining query lists
Maybe you should try regexp match?
Code:
QObjectList *ABClist = BigFrame()->queryList( "Q(Button|LineEdit|ComboBox)" , 0, false, true);
Re: combining query lists
Code:
QObjectList *list = BigFrame()->queryList( "QButton", 0, false, false);
list << BigFrame()->queryList( "QLineEdit", 0, false, false);
list << BigFrame()->queryList( "QComboBox", 0, false, false);
Re: combining query lists
Quote:
Originally Posted by jacek
Code:
QObjectList *list = BigFrame()->queryList( "QButton", 0, false, false);
list << BigFrame()->queryList( "QLineEdit", 0, false, false);
list << BigFrame()->queryList( "QComboBox", 0, false, false);
You would think this would work great, but "<<" isn't defined for QObjectList. I can't find anything in the documentation that tells me how to do anything other than an initial assignment of a list or appending a single item at a time.
I don't want to do the regexp if I can at all avoid it because that's only for the name as opposed to the object type, which could get flakey. I'm using 3.3.4, so I don't know if this has changed for Qt 4. Any other workarounds someone might think of?
Thanks again,
Jay
Re: combining query lists
Code:
QObjectList *list = BigFrame()->queryList( "QButton", 0, false, false);
QObjectList *list2 = BigFrame()->queryList( "QLineEdit", 0, false, false);
QObjectList *list3 = BigFrame()->queryList( "QComboBox", 0, false, false);
while(QObject *item
= list2
->take
(0)) list
->append
(item
);
while(QObject *item
= list3
->take
(0)) list
->append
(item
);
Much slower, but should work in Qt3.