Qt 5.0.1 project crashes [closed] - qt

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Improve this question
I've got a project using Qt 5.0.2, and my OS is Windows 7 32 bit.
I am working on big project from months and I didn't had any problems with it to now.One of my dialogs, is Print Preview Dialog and the other dialog contains SSN calculation algorithms with line edit. When I put the project on Debug Mode, my Print Preview Dialog works great, I can print everything that I want, but when I start typing something in the SSN line edit, the program total crashes. And reverse, when I put Release Mode, SSN works fine, but when I do click on the "Print" button in the Print Preview Dialog, my program crashes again. Today, I tried to put in some other objects like (buttons, line edits, etc), but the program does not recognize them.For example when I write ui-> ... and I don't get the new objects.
I think that I need to download and install the newest version of Qt (5.1.1), but I don't know, could I change my Project version easy. I am afraid, that nothing will work after this new version install. Please tell me what to do. Should I install the newest version, cause I can't continue my Project.

Qt != Qt Creator. The creator is just the IDE. Qt is the framework you're using. Please don't confuse everyone by using the two terms interchangeably.
It's trivial to build your project for multiple Qt versions, even for Qt 4 and Qt 5. Qt Creator supports an arbitrary number of Qt installations. You can select what you're building for in the Projects pane of Creator. You can then build for whichever kit. Before you do that,
set up the newly downloaded version of Qt in Creator
set up a kit using that Qt version; The kit is a combination of Qt version, compiler, target environment (Desktop in your case), etc.
Most likely you have memory bugs in your program. The usual suspect is double destruction of objects caused by giving an automatic (on-the-stack) QObject/QWidget a parent. You can use Valgrind on Linux to find such issues.
To be sure of what's going on, delete the build directory and rebuild your project.
Qt Creator version is mostly irrelevant in this discussion. Qt 5.1.1 binaries coincidentally come with Qt Creator 2.8.1, that's just for your convenience. It doesn't mean you can only use creator 2.8.1 with Qt 5.1.1. I'm using it with both Qt 4.8 and Qt 5.1.

Related

Is there an equivalent tool to Appium for windows Application (not mobile)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I use to work with Appium for mobile automation, now i want to use the same logic of Appium but for windows desktop application.
Is there any automation tool similar to Appium but to test desktop windows application?
(Other than RIDE and AutoIt) i 'm using ride with Sikuli library but i find that Is not as good as Appium which offer a many locations strategies by name,by id, by xpath ... there is no good strategy to locate elements only by image using SikuliLibrary or mouse click position using AutoItLibrary so that if i change from Windows 7 to 10 image will not respond to our scripts ....
Sikuli and Appium are two different types of application and test approaches. This is well beyond the scope of SO and I urge you to look elsewhere for that type of information.
Within the Robot Framework community a number of official/common libraries exist. These are well known and easily found. However, there are also a large group of libraries that are not found in the Python Repository but freely available on (example) GitHub. On top of this there are the plain Python modules that can be directly imported and whose methods are then usable as keywords. If your favorite application has a Python interface or module, then creating a Robot Framework Library is not difficult.
Given the specific topic of Windows Desktop Application testing with Robot Framework my first search result lead me to the Official Python Testing Tools Taxonomy Page for testing and it's GUI testing section. From this list the PyWinAuto project shows most promise as it supports windows and is open source. A Robot Framework Library robotframework-winbot exists, and still works but has not been updated in a while.
As you mentioned Appium, I've also taken a look there and although the Robot Framework Library keyword documentation doesn't seems to support Windows application, Appium itself has recently released some support for Windows Application UI Testing. This is based on the fairly new Microsoft Windows Application Driver. Python sypport is available, as there are Python examples in the Python Samples section, but no specific Robot Framework Library.
There may be other options, but I recommend you try these first and raise specific questions when you encounter issues.

Migrating code from Qt free version to Qt Commercial [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
Friends I am in dilemma.
None of the threads explain if [and how ] i can migrate an application from Qt free version to Qt commercial.
Me and my friends started developing an application using Qt[freely available] for learning .
We have created a good application and think we can sell it for pocket money.
The application does not modify any of the Qt source[we are not that good programmers :P] and we dynamically linked also.
I want to know how can i migrate it to Qt Commercial [since it protects from giving my source code].
First things first
a) can i migrate an application[not distributed in any form] written in Qt free version to Qt commercial.
b) will i have to re-write the application again in Qt commercial version or i can use my source files from old project and migrate to new Qt commercial project.
c) are there any API difference between Qt commercial libraries and Qt LGPL libraries that will make porting difficult/impossible. we still plan to have dynamic linking
d) i hope all Qt LGPL features are supported in Qt Commercial.
e) is there any complex legal thing i need to know. i only understand with LGPL we have to distribute code / object code + dynamic linking but in Qt commercial we dont have to.
If it is possible and legal then only we will buy Commercial License[expensive huh] ?
Why don't you go to qt.digia.com click Try&Buy and then Download and Install Qt Enterprise.
You'll see if you can port it before actually buying a license.
And for licensing questions I would suggest to contact then directly. I guess they would give you all the answers you need and try to help you with any problems you run in to.
The core is basically the same. So you can compile your existing code by enterprise version with no change. The only reason for the commercial license is if you need commercial support or you are shipping on an embedded platform like a cellphone.
Qt Enterprise has some more features and tools like Charts, Qt purchasing, Qt Quick Compiler, Boot2Qt and some others.
I see two really big issues:
Not understanding the terms of the commercial license you plan on using.
Not understanding the terms of the LGPL you develop under: they are nothing like what you state.
The terms of the commercial Qt license either expressly prohibit what you have done, or it is implied/understood that what you did is a NO-NO. Your project is now legally tainted and you can't ever apply the commercial license to it unless you buy the licenses for all the developers that participated in the development. They'd go broke long ago if everyone was as "clever" as you are.
The LGPL does not force you to release your source code. All it forces you to do is to let the end user re-link with binary-compatible Qt of their choice, and for you to allow access to the sources of Qt you used. If you use a release Qt, all you need to provide, on request, is the .zip of the Qt version(s) you redistribute. Since you link dynamically with Qt, there's nothing further you need to do here.
The only binary differences between commercial and open source Qt are in the license markers. There's literally nothing you need to do to link your code with a commercial Qt. Just swap out the DLLs and you're done.
I'm not a lawyer.

static linking Qt with open source version [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I'm developing an application with the Qt open source edition. As I don't want to deliver the Microsoft Visual Visual C(++) redistributables, I'd like to use a static-linked version of Qt.
The Qt licensing information says that I "should" develop with a commercial Qt license if I want to use static linking in my application, although when I use the configure -static command for building a static Qt library the command prompt asks me if I use the commercial or open source version of Qt.
So it is possible to build Qt with the open source version? Do I need the commercial edition to use static linking? I won't sell the application.
EDIT April 2016
Actually, I have recently been reading in depth about LGPL, and asking some experts on the subject. Turns out that the inability to use static linking for Qt in closed source applications is more of a cultivated legend and has nothing to do with reality.
What LGPL requires is the possibility for the end user to relink the application against a different version of the library. Using dynamic linking is one way to achieve that, but you can just as easily provide your object files, this way you don't have to open your source and the LGPL requirement is still satisfied.
On the Qt website there are 2 legal FAQs and in neither of them is it directly stated that you can't do it. Just as it is not stated that you can. However, there are at least several instances of implying a vague legal threat in case that you do. I think there is a good explanation for all of those - they can't say that you can't do it without publishing a practical lie which may as well have negative legal repercussions for them, and they are willing to discourage doing that rather than encourage it, as it has the potential to force more people into purchasing a commercial license.
So in short, yes you can, and you most definitely should as lately Qt has become a living deployment hell, plus as of Qt 5.7 in a static build, QML files are tucked neatly in the executable rather than being out on the file system, for anyone to tamper with. Just make sure that:
your Qt build only contains modules, licensed under LGPL, and nothing GPL
the about section of your app mentions that it is using Qt and contains a link to where you can download the application's object files
include all the respective license files with your application
Lastly, your application actually has to be "relinkable", that is, it must be able to work with a compatible library version that provides the necessary functionality. Which means that if you have made modifications to Qt before building it, you must provide those in the form of source code as well, but only the modifications to Qt, not your application's source code.
Update:
Here is an excerpt directly from the GNU FAQ:
For the purpose of complying with the LGPL (any extant version: v2,
v2.1 or v3):
(1) If you statically link against an LGPL'd library, you must also provide your application in an object (not necessarily source)
format, so that a user has the opportunity to modify the library and
relink the application.
That states it pretty clear.
The old, original answer:
It is possible to build Qt statically as long as your application is open-source and you provide the source. If you want to keep your source closed, you either need an expensive commercial license, or you need to use dynamic linking.
BTW using a static build of Qt is pretty nice, for Qt5 I get about 7-8 MB executable with no external dependencies, which is much better than the 20+ MB of additional dll's you have to ship with a dynamically linked app.
For more information, you can take a look at this video: Making the correct license choice when developing with Qt
All in all, can it be done? 100% yes. Should it be done? It depends, for personal/testing/learning purposes it is 100% OK, however if you plan to distribute production grade software, be that commercially or not, open source or not, you'd better first consult with a lawyer. The whole subject is unnecessarily complicated, subject to interpretation, so that the consultation with a lawyer becomes more expensive than a pricey commercial license.
The answer is Yes, if you are willing to open source your application.
According to the Qt-Project's own interpretation of the licenses they use, if you dynamically link to the Qt libraries your application can be either closed source or open. If you statically link, however, your application is subject to the terms of the LGPL.
The exact language the Qt Project uses is this:
In case of dynamic linking, it is possible, but not mandatory, to keep
application source code proprietary as long as it is “work that uses
the library” - typically achieved via dynamic linking of the library.
In case of static linking of the library, the application itself may
no longer be “work that uses the library” and thus become subject to
LGPL. It is recommended to either link dynamically, or provide the
application source code to the user under LGPL.
(http://qt-project.org/legal.html)
The suggestion in some of the other answers that the situation is "not at all clear" is simply untrue - The Qt Project has tried to be abundantly clear about in what circumstances usage of the LGPL license is permissible, and static linking is one of those as long as the app is also LGPL.
Since the original question specifies non-commercial (not necessarily open source), the asker will need to decide whether they can allow distribution under the LGPL (or GPL by extension, as the above page also says "LGPL can be converted to GNU General Public License").

Qt Changes and LGPL [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
My company uses Qt 4.7.4 under LGPL for a commercial proprietary application.
We had to put two changes into the source code of Qt and re-build its DLLs to resolve some issues. What should we now do under LGPL? Are we to expose our source code? or do we just need to expose the Qt files we've changed? What is the nature of this "exposure"? posting them on a website?
how does that work?
LGPL is mainly meant for libraries and means that you can use Qt with "closed-source" applications, i.e. ones you do not have to divulge their source code.
Would Qt be GPL, you would have had to open-source your own app, too.
Now, LGPL also means that if you modify the sources of the library, you have to make these modifications open and public.
How this is done is not fixed in stone. If your modifications is of general interest, you should submit a patch to Code Review. see Contribute to Qt for more info.
If it is very specific to your needs, publishing the patch on your website should be sufficient.
Nothing has really changed, the Qt is still LGPL, your app is still proprietary
You have to make the modified version of the Qt sources available. The strict interpretation by GNU is that you must host your own copy of the Qt source tree that you you modified and make that available.
A more useful one, if these are just small fixes, is that you make patches to the Qt tree available. Ideally you would contribute these fixes back to the Qt source and have them adopted - which saves you from the effort of reapplying them to subsequent versions and makes it a lot easier for your users.
Hopefully with Qt moving to a more open development following the decline of Nokia this will become easier.

Cross platform installer for Qt [closed]

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 9 years ago.
Improve this question
I'm trying to find a cross platform installer for small Qt applications.
It looks like the most popular (powerful ?) is BitRock Install Builder, but as the installer will be used in a school (I'm a teacher), I'm looking for a free/open source solution.
I'd like to generate an installer for a simple application on Windows, Mac and Linux OS.
For Windows and Unix, use InstallJammer.
For Mac OS X, use the tool that comes with Qt itself: macdeployqt. Read about it in more detail here. This application will add all the required frameworks and build a DMG out of your app in one call from the console.
If you have any resource files (like images, or XML files etc) that you want to distribute with your application, compile them into your application directly with the Qt resource system. This will make it easier to distribute your app, on all platforms.
I'd recommend NSIS. It's simple to use and it also integrates very well with CMake which would be very suitable as a build system for small applications.
For windows i suggest:
NSIS - http://nsis.sourceforge.net
izPack - http://izpack.org/
I guess there is no installer for all platform.
For Windows and Unix, you can use InstallJammer.
For MacOSX you need to create a dmg image. This is very simple. Read the following web page for help : http://www.wikihow.com/Make-a-DMG-File-on-a-Mac. By using apple script you can customize dmg (like an Application folder link into the dmg).
My preference for Win32 installer is NSIS.
I have successfuly used InstallJammer for Qt programs on Linux and Windows.

Resources