I have Qt application that is using QQuickView. I am trying to record some test and Squish produces just one line attachToApplication("myApp").
What I am doing wrong?
Is it any extension should be installed separately for QQuickView apps?
I am using squish for Qt.
Related
I'm new to Qt, all the development we have done so far for our UI project is using qml.
When I release this project to somebody who don't have Qt installed I'm sharing the .qml files as well (when packaging the exe).
Is there a method/process to share a qt exe without sharing the .qml files?
I assume you have your QML files outside of the app and you load them something like this:
QQuickView view;
view.setSource(QUrl::fromLocalFile("application.qml"));
view.show();
if you want to integrate your QML files directly in code and hide them from users you should use Qt Resource System. Add Qt Resource file to your project and pack all your QML files into it. You can then use them in your app like this:
QQuickView view;
view.setSource(QUrl("qrc:/application.qml"));
view.show();
More info about Deploying QML Applications you can read here
please note that I am not a native in English. sorry for any mistake.
I am very new to QT(just started yesterday) and have only few experiences with MFC.
I want to know how to integrate QT GUI DLL into non QT application.
I made this QT GUI DLL from the wizard: I simply chosen QT Gui Application and in .pro I changed "TEMPLATE = app" to "TEMPLATE = lib", as well as changing source code.
I attached source code here, you may looks at it.
http://cfile208.uf.daum.net/attach/025A524151C3E65D1B5E63
in the zip file, sources in folder "gui" does creating GUI DLL.
sources in folder "main" actually loads DLL and try to call the function in DLL.
they compiles well, but it seems they do not work. it gets an error called "there should be only one application object" when I start main.exe
What is the problem?
Don't create QApplication object in your library. There must be only one QApplication object, and it's already created by the main app.
If you need to access QApplication object from your library, use qApp macro to obtain a pointer to the QApplication.
I am trying to develop a user interface using QtCreator on a Windows 7 64-bit machine. This user interface will be deployed on a 32-bit Windows 7 machine, and will control a projector and a camera for a structured-light application. For reasons beyond my control (compatibility with camera and projector's APIs), I will use the MS VS 2010 32bit compiler for this. After a couple of weeks trying to have everything I need working together (Qt 4.8.4, QtCreator and Point Cloud Library), I am now facing a slight problem.
Is there a way that I can embed the PCL Point Cloud Viewer inside my main Qt GUI window? The problem is that when I use the PCL viewer, it brings up a separate window. I want this window to be embedded inside my main window, and I want to still be able to interact with it (rotate, pan, zoom, etc.).
As you may be able to tell from my post, I am a newbie on Qt/PCL/etc., so any example with minimal code to do this would be greatly appreciated. I have done weeks of research on this and I have not been able to find a solution, although I get the impression that a Qt Widget might be the way to go.
You can simply use PCL's PCLVisualizer, which is extensively described here, via the QVTKWidget. This is the setup I'm currently running. So you would end up doing something along the lines of the following (pseudo-)code:
In your header:
class PointCloudWidget : public QVTKWidget
{
//Whatever comes before (constructor, methods, etc.)
private:
pcl::visualization::PCLVisualizer m_visualizer;
};
And in your cpp:
PointCloudWidget::PointCloudWidget(QWidget *parent) : QVTKWidget(parent)
{
this->SetRenderWindow(m_visualizer.getRenderWindow());
}
You can then use the visualizer to achieve the same functionality as the PCL viewer has.
Look at the kind of minimal code I put here (PCL Viewer with Qt GUI minimal code).
There are some redundancies, but the code I believe is pretty straightforward.
The main idea is to put the files in the one folder and start project from CMakeLists.txt (Qt cmake wizard).
I use build directory inside project dir. (this is important, because in pclwindow.cpp I hardcoded the path to the generated file #include "build/ui_pclwindow.h"
If app builds, but crashes you'll probably need to add some dependencies (e.g. dll files on Win platform)
I hope it will give you fast and simple start!
I'm trying to create some kind of a server which allows me to start Qt's applications on remote machine via web browser.
I'm wondering it is possible to change/hide some symbols from Qt library (I thought about QApplication or QCoreApplication) without making any changes in code of application (I assume that it is already compiled and uses Qt shared library) and compiling my whole tailor-made Qt libs?
The reason why I need to do this is because I want to install my own specific EventFilter to QApplication and also be able to push my own created events to Qt application.
It also would be great if the solution could be used on all platforms :D
P.S. I know that it will not be possible I could subclass QApplication and modify all Qt apps to use my derived class but I would like to do this more craftily. ;-)
The tool GammaRay does all kinds of injecting code into Qt methods at runtime to attach and debug running Qt applications. You might want to have a look at its code base to see how it is done.
I have a pre-existing application, that calls out into a plugin library. I want the plugin library to be developed in Qt, and to be able to display a Qt UI.
However, when I attempt to create a QWidget it complains that the QApplication needs to be created first.
Is it not possible to use Qt to develop cross platform plugins?
E.g. a netscape plugin for Chrome or Firefox. I do not, and cannot, control the app's main loop.
As explain in the Qt documentation, any GUI application using Qt needs a QApplication to be created into main thread since it is containing all signal engine and event loop.
There is Qt/MFC Migration Framework that can help you to build plugins if the main application where the plugin is laoded is Win32 or Mfc. Qt/MFC Migration Framework