首页 \ 问答 \ 双击QWidget(QWidget with doubleclick)

双击QWidget(QWidget with doubleclick)

我希望能够双击一个QPushbutton而不是一次点击。

我试过的:

connect(pb, SIGNAL(doubleClicked()), this, SLOT(comBtnPressed()));

错误说“QObject :: connect:没有这样的信号QPushButton :: doubleClicked()”

我最初选择了QPushButton,但出于我的目的,如果可以进行双击事件,您可以建议更改为其他对象。 不一定是按钮。

谢谢Qt和C ++大师。


I want to be able to double click a QPushbutton instead of a single click.

What I tried:

connect(pb, SIGNAL(doubleClicked()), this, SLOT(comBtnPressed()));

Error says "QObject::connect: No such signal QPushButton::doubleClicked()"

I chose QPushButton initially, but for my purpose, you can suggest change to other object if it can make a doubleclick event. Not necessarily be a push button.

Thank you Masters of Qt and C++.


原文:https://stackoverflow.com/questions/47383722
更新时间:2022-05-31 07:05

最满意答案

搞定了。 无论是否使用异步,正确的方法都有效,即在创建Jetty服务器连接器时设置输出缓冲区大小。

HttpConfiguration httpConfig = new HttpConfiguration();
httpConfig.setOutputBufferSize(1024);
ServerConnector httpConnector = new ServerConnector(jettyServer,
        new HttpConnectionFactory(httpConfig));

默认值为32768。

(注意:无需覆盖onResponseContent方法)


Got it working. The proper approach works whether async is used or not, which is to set the output buffer size when creating the Jetty server connectors.

HttpConfiguration httpConfig = new HttpConfiguration();
httpConfig.setOutputBufferSize(1024);
ServerConnector httpConnector = new ServerConnector(jettyServer,
        new HttpConnectionFactory(httpConfig));

The default is 32768.

(Note: no need to override the onResponseContent method)

相关问答

更多
  • 这是一个套接字超时,所以你在HTTP级别做的任何事情都无法修复它 - 因此你保持活着没有实现任何目标。 尝试在SocketConnector上设置maxIdleTime 请参见: http : //docs.codehaus.org/display/JETTY/Configuring+Connectors ( 存档链接 ) This is a socket timeout, so nothing you do at the HTTP level can fix it - hence your keep al ...
  • 我添加了以下属性来启用ssl调试: -DDEBUG=true -Dorg.eclipse.jetty.LEVEL=DEBUG -Djavax.net.debug=ssl,handshake,data 这就是诀窍。 ;) I've added the following properties to enable ssl debugging: -DDEBUG=true -Dorg.eclipse.jetty.LEVEL=DEBUG -Djavax.net.debug=ssl,handshake,data T ...
  • 所有的码头资源都可以在网上找到。 码头6可以在codehaus.org找到 http://git.codehaus.org/gitweb.cgi?p=jetty-project.git 码头7: http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/log/?h=jetty-7 https://github.com/eclipse/jetty.project/tree/jetty-7 码头8: http://git.eclipse.org/ ...
  • 您必须像这样将SslContextFactory传递到HttpClient : HttpClient httpClient = new HttpClient(new SslContextFactory()); 你甚至可以通过信任所有人或给它一个密钥库来配置SslContextFactory : new SslContextFactory(true); new SslContextFactory("/path/to/.keystore"); You have to pass a SslContextFac ...
  • 对org.mortbay.log的引用意味着你正在使用一个古老的前码头-7版Jetty(可能是Jetty 6)。 这是你沮丧的原因。 你的jettyRunWar没有使用Jetty 9,它使用的是Jetty 6(?) The reference to org.mortbay.log means you are using an ancient pre-jetty-7 version of Jetty (likely Jetty 6). That is the cause of your frustration ...
  • 您可以忽略此消息,我认为如果远程浏览器关闭连接,则会生成它们。 这不是错误。 You can ignore this messages, I think they are produced if the remote browser closes the connection. It is not an error.
  • 我自己做了它和答案 - 它可能。 下面的服务器上的代码示例: package Server.src; import ClientServer.model.Envelope; import org.apache.commons.codec.binary.Base64; import org.apache.log4j.Level; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHan ...
  • 请查看本文以声明名为'agepro-ds'的JNDI数据源: http ://umanga.wordpress.com/2008/11/07/maven-jetty-plugin-jndi-jdbcdbcp-configuration/ Please take a look at this article to declare your JNDI datasource called 'agepro-ds': http://umanga.wordpress.com/2008/11/07/maven-jetty ...
  • 搞定了。 无论是否使用异步,正确的方法都有效,即在创建Jetty服务器连接器时设置输出缓冲区大小。 HttpConfiguration httpConfig = new HttpConfiguration(); httpConfig.setOutputBufferSize(1024); ServerConnector httpConnector = new ServerConnector(jettyServer, new HttpConnectionFactory(httpConfig)); ...
  • 要使Jetty的HttpClient能够使用HTTP / 2,您需要按照文档中的说明使用HTTP / 2传输实例化它。 支持HTTP / 2和HTTP / 1之间的自动切换正在开发中,请参阅https://github.com/eclipse/jetty.project/issues/1350 。 另外请记住,对于HTTP / 2通过TLS工作,您还需要设置ALPN。 推荐的方法是使用内置支持ALPN的JDK 9,因此您需要classpath中的jetty-alpn-java-client工件,另请参阅ht ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)