QTableView / QTableWidget: Stretch Last Column using Qt Designer - pyqt

I am trying to stretch the last header of my QTableView / QTableWidget in PyQt. Multiple questions have been asked about this topic already by hard coding the value into the file such as:
Qt table last column not stretching to fill in parent
How to stretch QTableView last column header
But how can this be achieved from the Qt Designer?

In the Qt Designer, Select the QTableWidget / QTableView and navigate to the Property Editor. Here, scroll down to the 'Header section' and enable horizontalHeaderStretchLastSection.

Related

Python PYQT5 Draggable Window/Tools

I can't find the term for it. But What I am looking for is help on how does do a Window that consists of multiple widgets.
Many software consists of this feature where you could drag and drop a window/tool window.
It drags and drop in a form of layouts and it's resizeable by dragging.
Image 1 is where you could drag and drop.
Image 2 is the entire thing. where the layout is fluid and can be resized.
My PYQT5 mainwindow consists of the QtabWindows and QlistWidgets.
Tabs should be able to split/join and create new layouts as such in the picture.
All help is greated appreciated

Tkinter dynamic TreeView row resize

Problem: I created a Tkinter Frame containing a ttk.TreeView widget. Each row contains text from Reddit posts. However, lenghty posts (or with plenty of newlines) are not completely visible in the row.
Question: Is it in any way possible to resize individual rows based on the content that is loaded in?
No, it is not possible to resize individual rows of a treeview.
To avoid such problem I just added right click function to treeview rows to show 'advanced view' of specific informations. When clicking on any row there is just small window shown with additional data corresponding to that row.

Excel: Is there a way to programmatically change the background colours of individual cells in a multi column listbox control

I have a multi-column list box control embedded in Excel, is there a way to change the background, font, and other attributes of an individual cell (rather than changing all the text in the listbox)?
I don't mind which listbox control I use (activeX or otherwise).
I would also consider using another control that isn't tied into the excel worksheet rows and columns (i.e. I can't use a table).
Excel's built in listbox control doesn't really have formatting options, but you can do quite a bit with the listview control.
You'll have to add a reference to Microsoft Windows Common Controls 6.0 (from VBA window go to Tools and click References, and scroll to find it). There's not an effective way to change the background color of a single cell in the listview table, but you can change the font color and make text bold in specific cells or based on criteria.
The syntax to populate the listview is a bit different than listbox, but there's quite a bit of material online for this if you think its the way to go. Also - I have only used listview in a form, but it should be possible to add this as an ActiveX control in an actual sheet.

Clicking the DataGrid row to Open Details Dialog

My project consists of two Dialogs.
The first one contains ado data control and datagrid used for searching a specific record.
The result is displayed in DataGrid
Double clicking the row of the Grid suppose to opens the details Dialog with the record in the row which clicked.
I'm using mfc visual c++6
Any help would be appreciated.
you can use MFC Grid control for grid display and you can catch double click event of grid control.
detail implementation of mfc grid is given in following link.
http://www.codeproject.com/Articles/8/MFC-Grid-control-2-27

javaFX textarea - columns/rows

The textarea-class in JavaFX should give me the option to add rows and columns, but the way I tried didn't work:
TextArea ta = new TextArea();
ta.setPrefRowCount(100);
ta.setPrefColumnCount(100);
I'm searching for columns/rows like in Microsoft Excel, inclusive the gridines.
.setGridLinesVisible(true);
doesn't work for this Type.
For use case similiar to Excel you're actually looking for TableView. Every table cell can contain anything, even another window so it is very flexible.
If you want grid lines on top of TextArea, but want to keep the standard TextArea behavior, you will have to combine the TextArea and TableView in a StackPane.
You will just have to clear the table's background using CSS.
However, matching the row and column sizes with the text will need some additional code.
Apologies for my English.
colums/rows like in Microsoft Excel, inclusive the gridines
TableView as recommended in Michael's answer is likely the right basic solution for.
There are some 3rd party controls you might consider which add some basic spreadsheet like functionality to the base JavaFX TableView control:
SpreadsheetView from the ControlsFX project.
TiwulFX from Panemu.

Resources