Kod
QWebPage page;
QWebFrame * frame = page.mainFrame();
frame->setHtml(str);
QWebElement document = frame->documentElement();
QWebElementCollection tables = document.findAll(".table");
int numTables = tables.count();
qDebug() << numTables;
return;
QWebFrame * frame = page.mainFrame();
frame->setHtml(str);
QWebElement document = frame->documentElement();
QWebElementCollection tables = document.findAll(".table");
int numTables = tables.count();
qDebug() << numTables;
return;
Pod zmienną str znajduje się źródło tej strony : http://panoramafirm.pl/szukaj/mazowieckie,...wa/firmy,1.html
Chcę pobrać ilość elementów o klasie table. Niestety program podaje, że tych elementów jest 0. Podczas gdy w rzczywistości jest ich 15.
Gdy zamiast ".table" dam "a", to zwraca mi to 17, czyli jakieś linki znajduje ale chyba jest ich ciut za mało.
W czym może być problem ?
Wszystkie tabelki są w divie o klasie "results" <- tego diva nie mogę pobrać.
Mogę za to pobrać div o nazwię 'socialIcons right" ale nie w całości - na nim program kończy parsowanie.