Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
569 views
in Technique[技术] by (71.8m points)

c++ - Qt Creator(设计器):带有水平滚动条的单个文本行(Qt Creator (Designer): Single text line with horizontal scrollbar)

How do I get a single text line with only a horizontal scollbar?

(如何仅使用水平滚动条获得单个文本行?)

I think that's all there is to this question.

(我认为这就是所有问题。)

I've tried it with QLineEdit only or withing QScrollArea , with QTextEdit etc, and nothing was remotly close to working properly.

(我已经尝试过仅使用QLineEdit或使用QScrollArea ,使用QTextEdit等进行尝试,并且没有什么可以正常工作的。)

That's what I got so far:

(到目前为止,这就是我得到的:)

在此处输入图片说明

It total it reads "Textexample", but the QLineEdit cuts it off and the QScrollArea doesn't provide a functional horizontal scrollbar.

(它的总读数为“ Textexample”,但QLineEdit将其截断,并且QScrollArea不提供功能性的水平滚动条。)

In the end I'd like to have a single text line, with a horizontal scrollbar so with the scrollbar I can see everything that's inside the text line.

(最后,我希望有一条文本行和一个水平滚动条,这样,在滚动条中我可以看到文本行中的所有内容。)

Thanks in advance.

(提前致谢。)

If more information is need, I'd be happy to help.

(如果需要更多信息,我们将很乐意为您提供帮助。)

  ask by Cpt. Crazy translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

See the fat properties of the QTextEdit :

(请参阅QTextEdit的胖属性:)

在此处输入图片说明


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...