简体   繁体   English

将 QLineEdit 添加到 qtcreator (designer) 中的 qtoolbar

[英]Add a QLineEdit to a qtoolbar in qtcreator (designer)

I have trouble with adding controls as a QLineEdit to a QToolbar from the IDE itself not by adding code (I can't do any GUI coding without a WYSIWYG editor)我在从 IDE 本身将控件作为 QLineEdit 添加到 QToolbar 时遇到了麻烦,而不是通过添加代码(没有 WYSIWYG 编辑器,我无法进行任何 GUI 编码)

I'd also like help with overlapping controls on it.我还需要有关重叠控件的帮助。

Another last question is how can I get a link from QWebview by hovering it (more like when web browsers show you the link you hover on.另一个最后一个问题是如何通过悬停从 QWebview 获取链接(更像是当网络浏览器显示您悬停的链接时。

Sorry for asking too much questions i'm a newbie you know.抱歉问了太多问题,你知道我是新手。

Thanks in advance提前致谢

  • There are some things you can't do with the Designer, and adding a QLineEdit or other widgets to a QToolBar is one of them, but you can do it easily with code:有一些事情你不能与设计师做的,并增加了QLineEdit或其他部件的QToolBar就是其中之一,但是你可以用代码轻松地做到这一点:

     ui.toolBar->addWidget(yourLineEdit); // or you can place it after an existing action: ui.toolBar->insertWidget(ui.anActionInYouToolBar, youLineEdit);
  • QWebPage has a signal linkHovered . QWebPage有一个信号linkHovered

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM