• 3971阅读
  • 4回复

QDialog的问题 [复制链接]

上一主题 下一主题
离线ruoyang
 
只看楼主 倒序阅读 楼主  发表于: 2008-04-04
— 本帖被 XChinux 执行加亮操作(2008-04-04) —
我生成一个BoxLayout的QDialog, 如果只添加几个widget(比如3个label,  2个qlineEdit)可以编译成功,如果添加多几个widget(5个label, 5个qlineEdit),就会出现内寸的unhandled expection,请问是怎么回事,如何解决,多谢
离线captain08
只看该作者 1楼 发表于: 2008-04-04
我试了一下,没问题呀。
你把代码贴出来看看。
离线ruoyang
只看该作者 2楼 发表于: 2008-04-04
QTextBrowser *spaceB;
spaceB->setText("dsafsadf");
QVBoxLayout *buttonLayout = new QVBoxLayout;
buttonLayout->addWidget(spaceB);

就出现exception了,不知道为什么
离线zncggaofei
只看该作者 3楼 发表于: 2008-04-05
是不是该这样写:
QTextBrowser *sapceB = new QTextBorwser();
spaceB->.....
There is someone that is coming or passing away in your life around the clock, so you may lose sight of those seen, and forget those remembered. There is gain and loss in your life, so you may catch sight of those unseen, and remember those forgotten. Nevertheless, doesn’t the unseen exist for sure? Will the remembered remain forever?
离线zncggaofei
只看该作者 4楼 发表于: 2008-04-05
你的sapceB只是个指针,没有实例,buttonLayout怎么addwidget
There is someone that is coming or passing away in your life around the clock, so you may lose sight of those seen, and forget those remembered. There is gain and loss in your life, so you may catch sight of those unseen, and remember those forgotten. Nevertheless, doesn’t the unseen exist for sure? Will the remembered remain forever?
快速回复
限100 字节
 
上一个 下一个