QLabel text with embedded ellipsis
-
I have a Windows dlg that displays like this:

I want my Qt based dlg to break the long path in the first line with an embedded ellipsis just like the windows dlg, but I get this:

How can I persuade the QLabel to do that?
Thanks
DavidHi,
You can look for inspiration in the Elided Label Example.
-
Hi,
You can look for inspiration in the Elided Label Example.
-
@Perdrix said in QLabel text with embedded ellipsis:
but that is not a good solution
Why? You wanted an elipsis, the example shows you how to do so, so why is this not a good solution?
-
@Perdrix said in QLabel text with embedded ellipsis:
but that is not a good solution
Why? You wanted an elipsis, the example shows you how to do so, so why is this not a good solution?
@Christian-Ehrlicher That code placed an ellipsis at the end rather than placing it at a sensible location in the middle.
Now that I have looked at it again more carefully I now think I it will be fairly simple to change it to place the elision point in the middle.
-
@Christian-Ehrlicher That code placed an ellipsis at the end rather than placing it at a sensible location in the middle.
Now that I have looked at it again more carefully I now think I it will be fairly simple to change it to place the elision point in the middle.
@Perdrix said in QLabel text with embedded ellipsis:
That code placed an ellipsis at the end rather than placing it at a sensible location in the middle.
You can look for inspiration
Why do people who call themself programmers expect that they can copy and paste everything from everywhere an it works out of the box...
-
@Perdrix said in QLabel text with embedded ellipsis:
That code placed an ellipsis at the end rather than placing it at a sensible location in the middle.
You can look for inspiration
Why do people who call themself programmers expect that they can copy and paste everything from everywhere an it works out of the box...
@Christian-Ehrlicher Because sometimes we think that the basic framework should provide a function and are surprised when it doesn't.
Furthermore we are often under time pressure, and don't always know how best to handle stuff
Sure given time and resources we can write what's needed, but sometimes we hope that it is there for the taking!