qt4

Installing multiple versions of Qt library

扶醉桌前 提交于 2020-03-20 06:27:05
问题 I have installed QtSDK in windows and its Qt library version is 4.7.0. Now i want to install Qt library version 4.8.2 for mingw and VS2008. How can i do this? How to introduce multiple versions to QtCreator? Note : I have downloaded libraries from http://qt.nokia.com/downloads 回答1: Sure you can. Just install the libraries in a different location and set Qt Creator to use those as well. You can find how here: http://doc.qt.io/qtcreator/creator-project-qmake.html. You can then choose which

How to tell the mouse button using QApplication::mouseButtons() in a “click” slot?

一个人想着一个人 提交于 2020-03-16 09:02:51
问题 I have a QMainWindow, and want to handle the "clicked" signal from a smaller widget (such as tableview) inside it. Originally I connect the signal to a slot of this QMainWindow, this is the most common approach. Now I need to tell which mouse button is clicked, and do different things for left and right button, I found that the "clicked" signal don't have the mouse event information. I tried to implement the "mousePressEvent" function,but there are still some problem. if the mouse action is

How to make smart installer for ovi applications [closed]

半腔热情 提交于 2020-03-06 09:26:26
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . How to make smart installer for Ovi applications? 回答1: Read the documentation. If you build your application with Nokia Qt SDK, qmake will automatically include the Smart Installer. But for Ovi Store, self-signed applications are not accepted. Thus you will need to get a signing certificate from Symbian Signed.

How to make smart installer for ovi applications [closed]

ⅰ亾dé卋堺 提交于 2020-03-06 09:25:51
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . How to make smart installer for Ovi applications? 回答1: Read the documentation. If you build your application with Nokia Qt SDK, qmake will automatically include the Smart Installer. But for Ovi Store, self-signed applications are not accepted. Thus you will need to get a signing certificate from Symbian Signed.

how to center a Qt mainform on the screen?

这一生的挚爱 提交于 2020-02-26 17:44:11
问题 I've tried these in my mainform's constructor: QRect desktopRect = QApplication::desktop()->availableGeometry(this); move(desktopRect.center() - frameGeometry().center()); QRect desktopRect = QApplication::desktop()->availableGeometry(this); move(desktopRect.center() - rect().center()); but both put the bottom right corner of the form at about the center of the screen, instead of centering the form. Any ideas? 回答1: I've tried these in my mainform's constructor That's likely the problem. You

how to center a Qt mainform on the screen?

橙三吉。 提交于 2020-02-26 17:38:08
问题 I've tried these in my mainform's constructor: QRect desktopRect = QApplication::desktop()->availableGeometry(this); move(desktopRect.center() - frameGeometry().center()); QRect desktopRect = QApplication::desktop()->availableGeometry(this); move(desktopRect.center() - rect().center()); but both put the bottom right corner of the form at about the center of the screen, instead of centering the form. Any ideas? 回答1: I've tried these in my mainform's constructor That's likely the problem. You

how to center a Qt mainform on the screen?

自闭症网瘾萝莉.ら 提交于 2020-02-26 17:37:20
问题 I've tried these in my mainform's constructor: QRect desktopRect = QApplication::desktop()->availableGeometry(this); move(desktopRect.center() - frameGeometry().center()); QRect desktopRect = QApplication::desktop()->availableGeometry(this); move(desktopRect.center() - rect().center()); but both put the bottom right corner of the form at about the center of the screen, instead of centering the form. Any ideas? 回答1: I've tried these in my mainform's constructor That's likely the problem. You

Qt - how to record and play sound simultaneously

谁说胖子不能爱 提交于 2020-02-26 07:12:55
问题 I posted this question on the Qt forum, but got no answers. That's why I am posting it here. I wanted to know is there any way to record and play sound at the same time in Qt. I want to record sound from a microphone and at the same time I want to play it in the speaker/headphone. Is there any way to do this in Qt? Or do I need to use any other library? It would be great if the solution is cross-platform (I need to cover windows, linux and mac). If it isn't possible, then a linux solution

How to anchor QGraphicsWidget/Item (make them static) on QGraphicsView

扶醉桌前 提交于 2020-02-25 04:36:20
问题 I want to make something like a hud. I have a QGraphicsScene with a huge QPixmap , that I added to a much smaller QGraphicsView . Now I need to add some control elements, like QLabel , QPushButton and QGraphicsEllipseItem . That's, I think, is not a problem. I found this helpful page Graphics View Classes. But how do I anchor this control elements to the View or maybe better said how do I not anchor them? When I drag the QPixmap , then I don't want that the hud is moving with the QPixmap out

How can I efficiently expand an entire subtree of a QTreeView?

女生的网名这么多〃 提交于 2020-02-05 13:57:38
问题 EDIT: it turns out that the root performance problem was a size-to-fit function attached to the expanded() signal, so I'm going to accept the first answer and delete this question for being misleading. Note: I'm asking this question so I can provide an answer for it (and maybe get a better answer). The solution is not intuitive. MacOS builds of Qt may have a way for the user to expand an entire QTreeView subtree (there was an open bug for it) but non-MacOS builds definitely do not. I am