ListWidget Text size fixed
-
@Prince_0912 Both links are not useful for me. they all are discussing the font size and I am asking about the text size managing
-
@Prince_0912 Both links are not useful for me. they all are discussing the font size and I am asking about the text size managing
@amarism ,
You can try like this in your code,
setSizeHint(QSize((listWidget->width()),((listWidget->height())))); -
@amarism ,
You can try like this in your code,
setSizeHint(QSize((listWidget->width()),((listWidget->height()))));@Prince_0912
I don't know whether your code does what the OP wants, nor what widget you are callingsetSizeHint()
on, but it won't be right to be usingQListWidget::height()
in particular, if anything it will need to beQListWidgetItem::height()
. -
@Prince_0912
In that link the example is:QListWidgetItem->setSizeHint(QSize((listWidget->width()),(listWidget->height()/4)));
which is quite different because it divides the list widget's height by 4 to fit 4
QListWidgetItem
s vertically. If the OP uses your suggestion, it won't come out anything like he is asking for. Up to you & him. -
@Prince_0912
In that link the example is:QListWidgetItem->setSizeHint(QSize((listWidget->width()),(listWidget->height()/4)));
which is quite different because it divides the list widget's height by 4 to fit 4
QListWidgetItem
s vertically. If the OP uses your suggestion, it won't come out anything like he is asking for. Up to you & him.@JonB When I use this code it will convert the whole height into 4 part. But I need to just break the text whose extra than image and print just below the main original text.
For Example, my extra text size is this and I want to cut the red part text and print below the text. -
@JonB When I use this code it will convert the whole height into 4 part. But I need to just break the text whose extra than image and print just below the main original text.
For Example, my extra text size is this and I want to cut the red part text and print below the text. -
-
@VRonin
In that doc it states:Please note that even if wrapping is enabled, the cell will not be expanded to make room for the text. It will print ellipsis for text that cannot be shown, according to the view's textElideMode.
I wonder whether it will expand vertically given that statement?
-
@VRonin
In that doc it states:Please note that even if wrapping is enabled, the cell will not be expanded to make room for the text. It will print ellipsis for text that cannot be shown, according to the view's textElideMode.
I wonder whether it will expand vertically given that statement?
-
@VRonin
In that doc it states:Please note that even if wrapping is enabled, the cell will not be expanded to make room for the text. It will print ellipsis for text that cannot be shown, according to the view's textElideMode.
I wonder whether it will expand vertically given that statement?