qlistview Questions

4

I am using QFileSystemModel along with QListView, and I want the first item shown by the model to get selected by default. How I do that every time I click an item ?
Lys asked 1/4, 2011 at 10:4

5

Solved

I have a QListView displaying a list of items but I don't want the items to be edited (Currently a double click on the item allows you to edit them). This is my Code: self.listView = QListView() ...
Omdurman asked 3/6, 2011 at 10:55

1

I'm using Qt5.2 anc C++ to implement an application and need to display a list with sections similar to the example image below: (source: ngo-hung.com) Please note I'm not implementing a mobile...
Albi asked 29/8, 2014 at 1:48

3

Solved

I'm still struggling with using QListView, I'm trying to select one particular row in the view and I cannot figure out how to do this. I found a similar question on StackOverflow which recommends ...
Abandon asked 3/8, 2011 at 11:48

3

Solved

I have a QDialog, created with QT Designer, that looks like so: The list of servers on the left is a QListView with a QStringListModel. Mouse clicking an item in the list view updates the form wi...
Terry asked 5/3, 2013 at 2:2

5

Solved

I have QListView and QTabWidget inside QSplitter. QListView is using custom model and custom delegates. In delegate I reimplemented paint and sizeHint methods. But when I resize view - height of el...
Quintain asked 8/5, 2013 at 15:28

5

Solved

I am trying to develop an image gallery application using Qt Framework. The application loads all the images from the selected folder and those images are displayed using QListView control. But no...
Naara asked 22/3, 2012 at 7:48

2

Solved

I searched a lot but I could not understand how to clear all items of QListView? I used QStringListModel and QStringList to fill it.
Peaked asked 3/9, 2015 at 6:22

6

Solved

Suppose my model has items with the following string for Qt::DisplayRole <span>blah-blah <b>some text</b> other blah</span> I want QTreeView (actually, any item view) to ...
Phillips asked 24/12, 2009 at 3:41

2

Solved

I developed a simple dialog with a checkbox, which allows the user to select one or several items from a list. Besides the standard OK and Cancel buttons, it adds Select All and Unselect All button...
Osana asked 3/6, 2018 at 12:58

2

Solved

I have a QListView that displays square-shaped items. My problem is that when I scroll this list, it scrolls one entire row of squares at a time, and I think that doesn't look right. Instead, I wou...
Estheresthesia asked 11/8, 2011 at 16:18

2

Solved

Using a QListView, and QStandardItemModel, is it possible to display icons in the list view without displaying the associated text? QStandardItem is defined as so: QStandardItem ( const QIcon &am...
Karren asked 8/4, 2010 at 4:12

1

I have a large log data (100, 1000, 100000, ... records) and I want to visualize it in the following manner: Which widget (e.g. QListView, QListWidget) should I use and how, in order to stay a...
Yvette asked 1/11, 2018 at 16:24

3

Solved

I'm using a QListView with a custom model derived from QAbstractItemModel. I have on the order of millions of items. I have called listView->setUniformItemSizes(true) to prevent a bunch of layou...
Yonder asked 8/9, 2015 at 5:9

1

Solved

I'm using pyqt4 with python 2.7 and I have a list view widget that I can't add items to it # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'add_category.ui' # # Crea...
Unbeliever asked 20/3, 2018 at 13:26

5

I'm writing a PyQt application and am having some trouble creating a custom list view. I'd like the list to contain arbitrary widgets (one custom widget in particular). How would I go about this? ...
Creech asked 4/6, 2009 at 3:24

4

Solved

How can I remove a list of selected items in the QListView in QT 4.6. Something like this does not work, the iterator becomes invalid: QModelIndexList indexes = ui.listview_files->selectionMod...
Affaire asked 24/7, 2010 at 12:42

1

I am having a QListView which has 5 items in it. say(America, Canada, Denmark, Egypt, Finland) in my QListView. Now i want to set a common Header for all this items as COUNTRIES. How can i set a He...
Penoyer asked 20/11, 2013 at 10:40

2

Solved

I need to get the selected item name in QListView as a QString. I have tried to google, but I haven't found anything useful.
Gallion asked 28/6, 2012 at 13:42

1

Solved

I have QListView *myListView; QStringList *myStringList; QStringListModel *myListModel; which I fill with data like this: myStringList->append(QString::fromStdString(...)); myListModel->...
Hajji asked 13/6, 2016 at 3:29

1

Solved

I have a QListView with IconMode view, LeftToRight flow, and wrapping is true. But I have a problem when I resize the widget that the item is not relayout. Is there any way to make it relayout? Man...
Abundance asked 20/1, 2016 at 9:45

4

How can I add columns to QListView control. Found a method addColumn while seardhing, but in my Qt Creator 1.2.1 based on Qt 4.5.2(32 bit) QListView doesn't have such method at all !!! So how woul...
Excursive asked 15/4, 2010 at 11:21

0

How to do item in QListView selected as I would click on him? Way I tried to do this I have selection but like not-active one. Without Blue highlight only grey one. To be mroe detailed: Make QLi...
Coulomb asked 18/11, 2014 at 11:9

1

Solved

I have my own subclass of QListView and I would like to change the color of an item with index mLastIndex . I tried with QModelIndex vIndex = model()->index(mLastIndex,0) ; QMap<int,QVarian...
Betrothed asked 29/7, 2014 at 11:20

1

Solved

I'm using QScroller on my QListView. How can I stop dragging the list away when it reaches its beginning or its end? Like image below.
Superorder asked 10/7, 2014 at 12:56

© 2022 - 2024 — McMap. All rights reserved.