You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, May 23rd 2012, 3:50pm

Qt String and ComboBox

hello every body
I have this "hcitool scan" standard output which is redirected in a "textEdit" as a SINGLE QString

Scanning ...
00:1E:37:BF:7C:4D Linux-PC-2-0
00:1F:00:3A: D7:8B Nokia

the problem is that I want to filter that string and get each device adress (eg: 00:1E:37:BF:7C:4D) and list them in a "comboBox" with "comboBox->addItem" of course ,
any suggestions ? thank you
:D

2

Wednesday, May 23rd 2012, 7:37pm

use a regex (QRegExp?) to match all mac addresses.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.