Hello,

I'm new to Qt programming, and am working on app development for the Symbian platform. My program needs to obtain the list of processes currently taking place within the mobile device, and add them to a listWidget. I'm currently working with the Nokia Qt SDK on Windows Vista.

The following is a Symbian S60 code snippet I got for doing so, but I need help adapting it for a Qt app on a smartphone. Any insight on procedure and libraries to include would be greatly appreciated; thanks in advance!

Qt Code:
  1. void CDriver_GuiAppView::GetProcessListL(void)
  2.  
  3. {
  4. process = 1;
  5. TFullName res;
  6. TFullName temp;
  7. TFindProcess find;
  8.  
  9. RDebug::Print(_L("\n \n List of processes running in the system:"));
  10. CTextListBoxModel* model = iListBox->Model();
  11. User::LeaveIfNull(model);
  12.  
  13. model->SetOwnershipType(ELbmOwnsItemArray);
  14. CDesCArray* itemArray = static_cast<CDesCArray*>(model->ItemTextArray());
  15.  
  16. User::LeaveIfNull(itemArray);
  17. itemArray->Reset();
  18.  
  19. while (find.Next(res) == KErrNone)
  20. {
  21. RProcess ph;
  22. ph.Open(find);
  23. RDebug::Print(_L("%S \n"),&res);
  24. temp.Format(KListFormatString, KFolderIconSlot);
  25. temp.Append(res);
  26. itemArray->AppendL(temp);
  27. iListBox->HandleItemAdditionL();
  28. temp.Zero();
  29.  
  30. ph.Close();
  31. }
  32.  
  33. iRoot = EFalse;
  34. iListBox->SetCurrentItemIndex(0);
  35. iListBox->DrawNow();
  36. }
To copy to clipboard, switch view to plain text mode