qlistwidget Questions

3

Solved

In CSharp it's as simple as writing: listBox1.Items.Add("Hello"); listBox1.Items.Add("There"); foreach (string item in listBox1.Items ) { MessageBox.Show(item.ToString()); } ...
Charley asked 31/8, 2012 at 21:18

3

Solved

QListWidget::selectedItems returns a list of QListWidgetItem, but the only function for removing an item that I found is takeItem, which accepts only indexes, and selectedIndexes function is protec...
Xray asked 10/8, 2011 at 9:15

2

Solved

I have a Qlistwidget in which I can select multiple items. I can get a list with all the selected items in the listwidget but can not find a way to get a list of the corresponding rows. To get a li...
Eskill asked 25/11, 2015 at 14:32

2

Solved

I'm having trouble implementing a QListWidget with custom items that can be reordered by dragging and dropping. The problem is when I make a fast double click (a very short drag&drop) on an ite...
Kongo asked 27/12, 2010 at 3:23

2

Solved

I'm using PyQt4 and I have a QListWidget in a window where I added items to it at run-time. I want to use a button in the window to clear the selection of the QListWidget. I want to know if there ...
Crowl asked 26/2, 2013 at 10:22

1

Solved

I've populated a QListWidget with a list of items and added a check box leaving everything unchecked. for td in root.iter('testdata'): test_data = td.get('ins') item = QtGui.QListWidgetItem(test...
Hysterogenic asked 24/3, 2015 at 16:48

2

Solved

I want to change the text color of the items in QListWidget. For example, some items are in red text while others are in blue text. How do I do that? Thank you.
Henleigh asked 5/2, 2010 at 21:3

3

Solved

This is related to Qt: QListWidget separator line between items? But this above answer adds separator line after each items, I would like to know a way to add the separator line after particular i...
Conspecific asked 10/7, 2014 at 8:22

1

Solved

I'm using a QListWidget and enabled multiple selections: mReferenceList->setSelectionMode(QAbstractItemView::MultiSelection); The problem is, that this mode doesn't behave as is expected as s...
Yammer asked 3/7, 2014 at 10:5

1

hi i created 2 files from qtdesigner and i created a new file with a class where i want to use these UIs that i created. this is the file creating the QListWidget from PyQt4 import QtCore, QtGu...
Infundibuliform asked 25/6, 2014 at 19:47

2

Solved

Does anyone know if its possible to select multiple items on a QTreeWidget and how to go about enabling the multiple selection? All the items I want to be selectable are top level QTreeWidgetItems...
Strongminded asked 3/8, 2011 at 10:24

1

Solved

I am using QT 5.2 and Have a QListWidget witch displays a list of Strings and I want the first item (at 0) to be initially set to be highlighted. I tried the following: mUi->listWidget->setC...
Decarburize asked 14/4, 2014 at 16:21

1

Solved

The code builds a dialog box with a single QListWidget and a single QPushButton. Clicking the button adds a single List Item. Right-click on a List Item brings up a right-click menu with "Remov...
Geminate asked 18/3, 2014 at 19:21

2

Solved

Let's say I need to display a list of items. Each item contains a QPushButton an image and some text. When a user clicks on the button something should happen (ie I need to get the signal). What is...
Ductile asked 14/5, 2011 at 16:15

1

Solved

From the book I'm reading: By default, QListWidget is read-only. If we wanted the user to edit the items, we could set the view's edit triggers using QAbstractItemView::setEditTriggers(); for ...
Madaras asked 27/10, 2012 at 6:26

2

I am creating A Sortable List in Qt. The Code works perfectly well for Downward Scroll but when i having some issues getting the draggable item after i scroll the list down. I have added some test ...
Toot asked 4/10, 2012 at 8:31

1

I want to add double clicked attribute for my QListWidget objects. My command line does not work: self.connect(self.listWidget, QtCore.SIGNAL("itemDoubleClicked(QtGui.QListWidgetItem)"), self.sh...
Powerful asked 13/10, 2012 at 20:58

2

Solved

I have a QListWidget of calendars. Each QListWidgetItem is logically associated with an instance of Calendar, which is a class that belongs to the Model side of the application. Can I store this a...
Imbecility asked 12/2, 2012 at 10:14

2

Solved

How can I set the minimum height of a QListWidgetItem? I'm using QListWidget::setItemWidget() with a customized widget, and although I explicitly declared minimum height of my customized widget, th...
Halden asked 25/5, 2012 at 2:30

3

Solved

I have a QListWidget and I need to remove some items. From what I've researched, this is a generally unpleasant thing to do. I've read a tonne of solutions, but none are applicable to my specif...
Brigidbrigida asked 20/9, 2011 at 11:55

1

Solved

QListWidget has a member named clear(). The docs for this method state: void QListWidget::clear () [slot] Removes all items and selections in the view. Warning: All items will be permanently delet...
Tinge asked 7/3, 2012 at 1:58

1

Solved

How to add 2 Images and Text in QListWidget at run time in Qt? I want to place one image at the beginning of the list and one at the end and text should be soon after my first Image. itemclicked e...
Territus asked 8/11, 2011 at 8:41

2

Solved

The QListWidgetItem contains 2 data: icon and text. And I want to store another QString in it. How can I do? Here is my test code.The ListWidget displays nothing after I call addItem. And how can ...
Meyeroff asked 3/5, 2011 at 10:49

1

Solved

I've two QListWidget (list1 and list2) list1 should be able to receive items from list2 list1 should be able to be reorganized with an internal drag and drop list2 should be able to receive items...
Major asked 4/1, 2011 at 8:55

2

I have a QListWidget where I want to add a bunch of items with a custom widget: listWidget = QListWidget() item = QListWidgetItem() item.setFlags(item.flags() | Qt.ItemIsUserCheckable) item.se...
Nickname asked 22/12, 2010 at 14:47

© 2022 - 2024 — McMap. All rights reserved.