如何调整qdockwidget 布局的大小

Our Sponsor: Linux-Onlineshop.de
Friday, May 14th am
Can a QDockWidget Titlebar be hidden
Is there any way to turn off or make a QDockWidget Titlebar invisible but still have the benefits/features of the QDockWidget?
I have tried...
ui-&dockWidget-&titleBarWidget()-&hide();
ui-&dockWidget-&titleBarWidget()-&setVisible(false);
but get the error message:
The inferior stopped because it recieved a signal from the Operating System
Signal Name: SIGSEGV
Signal Meaning Segmentation Fault
Location: Florence
Occupation: Student
Saturday, May 29th pm
Assistants says about setTitleBarWidget: If widget is 0, the title bar widget is removed, but not deleted.
Location: INDIA
Occupation: Student
Tuesday, June 1st am
QDockWidget::setTitleBarWidget ( QWidget * widget ) -&Sets an arbitrary widget as the dock widget's title bar(custom title bars
we can add a titlebarwidget .i think cannot remove title bar
QWidget *TitleWidgetR=new QWidget(this);
Dockwidget-&setTitleBarWidget(TitleWidgetRec);
Location: Florence
Occupation: Student
Tuesday, June 1st pm
QDockWidget::setTitleBarWidget ( QWidget * widget ) -&Sets an arbitrary widget as the dock widget's title bar(custom title bars
we can add a titlebarwidget .i think cannot remove title bar
QWidget *TitleWidgetR=new QWidget(this);
Dockwidget-&setTitleBarWidget(TitleWidgetRec);
Yes it is, you are right. I fail!!
However, maybe, we can use setWindowTitle and submit an empty string. I don't know if it works, that is, title bar will be still there, but without title string inside. It's correct?
Tuesday, June 1st pm
void QDockWidget::setTitleBarWidget( QWidget
* widget )
Sets an arbitrary widget as the dock widget's title bar.
If widget is 0, the title bar widget is removed, but not deleted.
Source code
QWidget * titleBarWidget = dockWidget-&titleBarWidget();
dockWidget-&setTitleBarWidget( NULL );
delete titleBarW
or better if it works
Source code
delete dockWidget-&titleBarWidget();
Wednesday, September 1st pm
Source code
QWidget * titleBarWidget = dockWidget-&titleBarWidget();
dockWidget-&setTitleBarWidget( NULL );
delete titleBarW
Sounds reasonable, but does not appear to work. Apparantly a new title bar is created whenever the existing one is removed. The documentation is out of date or wrong.
This, however, works for me:
Source code
QWidget* lTitleBar = mDock-&titleBarWidget();
QWidget* lEmptyWidget = new QWidget();
mDock-&setTitleBarWidget(lEmptyWidget);
delete lTitleB
All I did there is feed the thing an empty dummy.
-----------------------
QtForum.org
&&&& QtForum
&&&&&&&& Tutorials, Tips and snippets
&&&&&&&& Qt Embedded, Qtopia, QSA
&&&&&&&& Qt Programming
&&&&&&&& KDE Development
&&&&&&&& Qt Designer
&&&&&&&& Installing Qt
&&&& Other Forums
&&&&&&&& C++ programming
&&&&&&&& Offtopic
&&&&&&&& Job Forum
&&&&&&&&&&&& commercial jobs
&&&&&&&&&&&& non commercial
Remember me?改变QDockWidget标题栏高度?该怎么处理 - QT开发当前位置:& &&&改变QDockWidget标题栏高度?该怎么处理改变QDockWidget标题栏高度?该怎么处理&&网友分享于:&&浏览:90次改变QDockWidget标题栏高度?如题怎么改变QDockWidget标题栏高度啊?&在代码里写,在界面上设.用QSS随便什么方法越简单越好.&谢谢.
------解决方案--------------------QWidget&*&QDockWidget::titleBarWidget&()&const
获得标题栏
void&QWidget::setFixedHeight&(&int&h&)
12345678910
12345678910
12345678910 上一篇:下一篇:文章评论相关解决方案 12345678910 Copyright & &&版权所有502 Bad Gateway
502 Bad Gateway【图】如何使QDockWidget的窗口一开始就是标签模式_qt吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:28,032贴子:
【图】如何使QDockWidget的窗口一开始就是标签模式收藏
QDockWidget可以多个合并成标签样式,但是无论在ui设计器还是代码我都没有找到相关的方法,只能程序运行之后手动拖,请问各位吧友,有什么方法使得两个dock一开始就是标签模式?
小时候,我们没有ipad ,不懂 LV ,理解不了阿玛尼 。我们只会打纸包玩烟壳,打玻璃球,用小霸王打魂斗罗。那时候,男孩追女孩,一追就是好几年,比的是心,念的是情。这年头儿,男人追女人,几天抱得美人归,看的是钱,拼的是爹。以前我们春游烧烤,坐在一起谈天说地。现在各自埋头刷微博,聊微信 。生活里,貌似所有人都不再那么无可取代 。满口忙事业,赚大钱虚荣,利益,气场儿让爱情,友情,亲情都遗失了当初的那份美好与纯真 。小时候,我们吃一毛钱一支的冰棒,二毛五一瓶的汽水,一块钱十根的粘牙糖 。如果哪个小朋友有五块十块那就传说中的大钞了,简直就可以当孩子王收小弟了。中学了,身上有20块钱,买了杂志,小说全班传着看 。身上有200块钱,去哪都昂首挺胸,超级自信。我们的小时候,没有电脑,没有网络,没有手机,那我们干嘛呢?1.蹲在地上观察蚂蚁搬家  2.追在别人后面踩别人的影子  3.对着电扇张大嘴喊“啊~”然后听颤抖音4.挤塑料包装纸上的气泡听啪啪的声音5.用圆规戳桌子,把笔帽吸在舌头上6.把三层的纸巾一层层分成薄片  7.学鲁迅在课桌上课桌上刻“早”字8.把泥土做成碗状,碗口朝下使劲砸向地板,看谁的碗底破洞更大9.下雨打伞时转伞看水珠飞出去   10.在婚礼现场捡人家扔剩下的彩色纸片当宝贝11.屏住呼吸,跟伙伴比赛憋气看谁憋的时间长12.用吸管喝水的时候,往水里吹气,发出咕嘟咕嘟的恶心声音   13.把手指插到刚熄灭蜡烛的蜡油里取指纹14.把内眼皮翻到外面来  15.男孩子站成一排,看谁尿得更远16.凤凰老牌大自行车比人还要高,右脚穿过三角形的车架,居然也能骑得那么熟练17.把小鞭炮拆开,火药粉撒地上围成个圆,用火柴一点搜一下,整个圈圈燃亮,好开心   18.冬天玻璃上结了冰的窗花,不知道怎么想得,非要用舌头舔一下   19.洗袜子的时候用袜子口对着水龙头接水~试图装满袜子   20.小时候老和几个小朋友一起玩,东南西北。现在你还会折吗? 致我们那再也回不来的时光,那个很容易幸福的年代,那段傻傻的,纯纯的,开心的时光~
贴吧拳王争霸赛中累计获取100场胜利,
setDockOptions(QMainWindow::ForceTabbedDocks);
QDockWidget* widget1 = new QDockWidget(tr("dockWidget1"), this);
addDockWidget(Qt::LeftDockWidgetArea, widget1);
QDockWidget* widget2 = new QDockWidget(tr("dockWidget2"), this);
addDockWidget(Qt::LeftDockWidgetArea, widget2);
tabifyDockWidget(widget1, widget2);
如果你想首先选择第一个widget,加上下面的代码widget1-&show();
widget1-&raise();
用函数 tabifyDockWidget 如在MainWindow的构造函数里加入 tabifyDockWidget (ui-&dockWidget,ui-&dockWidget_2);这时会默认选中ui-&dockWidget_2的标签,如楼上说的,想选择ui-&dockWidget这个标签,就ui-&dockWidget-&raise();
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
您的访问请求被拒绝 403 Forbidden - ITeye技术社区
您的访问请求被拒绝
亲爱的会员,您的IP地址所在网段被ITeye拒绝服务,这可能是以下两种情况导致:
一、您所在的网段内有网络爬虫大量抓取ITeye网页,为保证其他人流畅的访问ITeye,该网段被ITeye拒绝
二、您通过某个代理服务器访问ITeye网站,该代理服务器被网络爬虫利用,大量抓取ITeye网页
请您点击按钮解除封锁&

我要回帖

更多关于 qdockwidget 布局 的文章

 

随机推荐