Content of QTableWidget is cut while printing - printing

I have a table (QTableWidget) with many rows and having scroll bar. This is my command to print this table.
QPrinter printer;
QPrintDialog printer_dialog(&printer);
if (printer_dialog.exec() == QDialog::Accepted) {
QPainter painter(&printer);
ui.mytable->render(&painter);
}
But only the first rows, which are shown, will be printed. The below part of the table (which we have to scroll the table down with scroll bar to see) is not printed. How can I print all the content of the table?

Related

Enable Auto-scrolling LazyColumn to the bottom when reverseLayout = false

I have a LazyColumn holding some Items. I listen a Flow from Room and everything works great when reverseLayout = true. When new Item get inserted into the database, the LazyColumn scrolls to the bottom and shows last Item just fine. But reverseLayout = true inverts the headers too. So I disabled it with reverseLayout = false. This does not work in that when Item get inserted, it is shown on the list but the list does not get scrolled to show the bottom item. I have to manually scroll.
How can I scroll to the bottom Item when the LazyColumn get recomposed on items change?
I don't think I need to put the code since the problem happens with any use of LazyColumn but if that is important let me know and I can redact the code and post them!
In a messaging app i scroll to bottom using size of items and LazyListState
as
coroutineScope.launch {
scrollState.animateScrollToItem(messages.size - 1)
}
and whenever user inputs a message it gets added to
val messages = remember { mutableStateListOf<ChatMessage>() }
you can call scroll in a LaunchedEffect(messages.size){...} for it to be invoked only when recomposition happens and item count has changed

Nested tables overflow from the page in pdfmake (rows overflow not the columns)

I need to iterate the title content (not header) of the table to the next page, if the table spans over to the next page. Seems like the nested table was the only solution for it, as we can use "headerRows" property to iterate any content onto the next page during the table spanning over to the next page.
But after using the nested table approach, the rows of the table are just being overflowed in the same page and the rows are getting lost from the bottom of the page. I tried many combinations by applying many of the table related properties. none of them worked as expected.
Properties tried are: dontBreakRows, keepWithHeaderRows, pageBreak
Tried all sorts of combinations for both outer and inner tables, none worked as expected.
For better understanding of the problem: 30 rows - 3 sets of data (30x3) with each set having its own title to be displayed at the top of its table. As each set has 30 of rows, then the table for each set surely spans over to the next page, hence the same previous table title has to be displayed on top of the continued table (set) on the next page, and there will be a problem in either displaying the table title / handling the overflow of the table.

jquery-ui sortable table - selected row resizing table and table row contents shift

My codepen has a jquery-ui sortable on a table. A few problems that I see are: 1) selecting a row to drag adjusts table width during selection, but resumes to the correct table width after it is dropped. 2) The selected table row shifts outside of left border of the table containment. 3) The selected table row loses the table styling. The data scrunches up apparently losing its default padding-right of 10px.
I am running Windows 7 and use chrome browser rev 56.0.2924.87
May someone can answer me the redundant need to post code before one can post?
Putting the bare minimum code here. See pen for full code.
<table class="playlist-table">
I was unable to find this question prior to posting my problems:
jquery UI Sortable with table and tr width
Thanks go to Yaroslav for this helper class that fixed issue#3. The selected table row now preserves styling after being selected.
.ui-sortable-helper {
display: table;
}
And to Keith, his code fixed issues 1) selecting a row to drag adjusts table width during selection. 2) The selected table row shifts outside of left border of the table containment.
$('td, th', '.playlist-table').each(function () {
var cell = $(this);
cell.width(cell.width());
});

Toggle Custom UITableViewCell Radio Button

I have a custom cell where it displays a table like structure with multiple columns.
Each row has a column that is a button that will perform different tasks.
My issue is trying to get the middle column to communicate its state with the other rows.
Initially everything will be grey (not selected) but, when I tap the middle column button, the state will be green. When I select a different row that button will turn green and the previous row would be grey.
Again, each column in the row is a button that does something different (i.e. the right button loads up a modal view). I have tried to use
didSelectRowAtIndexPath but, with the overlapping custom views it does not seem to read the selection.
Any help would be appreciated

dropdown list "curtain" is somehow measured to only appear at the top of the screen

I am using this code: click here that "simulates" a dropdown menu as it works in html code.
I have programatically added the UITextField to my navigationItem using:
[self.navigationItem setTitleView:myUITextField];
My view is a UITableView and my controller therefore inherits from UITableViewController.
I have filled the table view with a number of rows of data. I have also set up the dropdown to act on a click in my "myUITextField" and the dropdownlist appears correctly when the textField is clicked.
My problem is that if I scroll down in my list of rows on the screen and then click again on my textField then I can only see the bottom of the "dropdown" - so the dropdown list "curtain" is somehow measured to only appear at the top of the screen.
How can I fix this ? I reckon I need to fix the source code here to get it fixed.

Resources