QTabWidget选项卡在垂直方向上,文本在水平方向上 [英] QTabWidget tabs on the vertical, but text in horizontal

查看:1369
本文介绍了QTabWidget选项卡在垂直方向上,文本在水平方向上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用带有这样的侧边栏的C ++ Qt开发一个应用程序:

I'm trying to make an app in C++ Qt with a sidebar like this one:

但是,当使QTabWidget朝向西方时,它将使文本变为垂直.如何使文本在左侧但水平对齐?附言:我不需要图标.预先感谢.

But when making QTabWidget's orientation to West, it makes the text vertical. How to have the text on the left, but horizontally-aligned? Ps: I don't need icons. Thanks in advance.

推荐答案

您可以使用 QListWidget 显示标签"(带有一些mod,使其看起来像您想要的)和

You can use QListWidget to show the "tabs" (with some mods to make it look like you want) and QStackedWidget to handle switching between pages like normal tab widget does.

这篇关于QTabWidget选项卡在垂直方向上,文本在水平方向上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆