【问题标题】:Porting C++ Builder to Qt [closed]将 C++ Builder 移植到 Qt [关闭]
【发布时间】:2017-03-07 19:28:46
【问题描述】:

我想移植一个 C++Builder 项目以在其 UI 中使用 Qt。有谁知道 VCL 的 TStatusBarTStringGridTListBoxTSpeedButton 组件的 Qt 等效项是什么?

【问题讨论】:

  • 哦,拜托,你都没试过。

标签: qt c++builder


【解决方案1】:
  • 对于TStatusBar,使用QStatusBar
  • 对于TListBox,使用QListBox(Qt4 中的Q3ListBox)或QListWidget
  • TStringGridTSpeedButton 显然没有等价物。使用 Qt 演示软件查看 Qt 工具包的建议并找到您正在寻找的内容。

对于其他类(OP未提及):

  • 对于TCheckBox,使用QCheckBox
  • 对于TRadioButton,使用QRadioButton
  • 对于TComboBox,使用QComboBox

【讨论】:

  • 答案有什么问题,为什么要投反对票?
  • 用“Q”替换“T”——除了一个以外的所有情况
  • 对于TStringGrid,您可以在其单元格中使用QGridLayoutQLabel 和/或QLineEdit 小部件。
  • @M.M:对于所有提到的课程,除了一个。但它一般都有效(TCheckBoxTComboBoxTRadioButton...)
  • 好吧,Qt 中没有 QStatusBar 对象,所以我所做的只是在 Gui 中放置一个 QFrame,然后在构造函数中将其转换为 QStatusbar,对于 TRAdioGroup,我使用了 QListWidget。感谢您的帮助@jpo38。根据我的研究,Button 和 SpeedButton 之间没有区别,所以我使用了 QButton。
猜你喜欢
  • 2022-01-23
  • 2022-09-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-07-18
  • 1970-01-01
  • 2012-11-16
  • 1970-01-01
相关资源
最近更新 更多