+ // Hide the second column.
+ parentFolderTreeWidgetPointer->hideColumn(folderHelperPointer->FOLDER_ID_COLUMN);
+
+ // Set the column header.
+ parentFolderTreeWidgetPointer->setHeaderLabel(i18nc("The folder tree widget header", "Select Parent Folder"));
+
+ // Create a bookmarks tree widget item.
+ QTreeWidgetItem *bookmarksTreeWidgetItemPointer = new QTreeWidgetItem();
+
+ // Populate the bookmarks tree widget item.
+ bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_NAME_COLUMN, i18nc("The bookmarks root tree widget name", "Bookmarks"));
+ bookmarksTreeWidgetItemPointer->setIcon(folderHelperPointer->FOLDER_NAME_COLUMN, QIcon::fromTheme("bookmarks"));
+ bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_ID_COLUMN, QLatin1String("0"));
+
+ // Add the bookmarks tree widget item to the root of the tree.
+ parentFolderTreeWidgetPointer->addTopLevelItem(bookmarksTreeWidgetItemPointer);
+
+ // Select the root bookmarks folder if it is the initial parent folder.
+ if (parentFolderId == 0)
+ bookmarksTreeWidgetItemPointer->setSelected(true);
+
+ // Populate the subfolders.
+ folderHelperPointer->populateSubfolders(bookmarksTreeWidgetItemPointer, parentFolderId);
+
+ // Open all the folders.
+ parentFolderTreeWidgetPointer->expandAll();