Qt applications on new Mac App Store - c++

I have a Qt app that runs on OS X that has potential to go on the new Mac App Store.
I have reviewed the guidelines at https://developer.apple.com/appstore/mac/resources/approval/guidelines.html. I also saw a post here on SO about Java and the AppStore.
Has anyone else considered this with their own apps and whether or not the Qt framework will run afoul of the App police? You still have to stay within the Apple HIG, i.e. no theming and cannot use private APIs.
Still seems like a risky proposition over pure ObjC. Anyone else tempted?

My Qt app has today been accepted and is available on the App Store. So the answer is yes, Apple will accept Qt based applications.
Here's some information about my application. It written in C++ and uses Qt v4.7.2 under the LGPL license. The Qt frameworks are included in the app bundle (obviously, as LGPL requires I use dynamic linking instead of static). There are also some other frameworks, from Nikon and Canon, because its an app for remote control of DSLR cameras - see http:www.hartcw.com . These are only available compiled for Intel 32bit, hence this forces my app to also target 32bit, and so I have to use the 32bit Carbon build of Qt.
Regarding writing files to the local hard disk, it does not write anything to the bundle directory, but does write to this directory:
~/Application Support/Hart/Smart Shooter
It also writes Qt GUI state to this file (via the QSettings class)
~/Library/Perferences/com.hartcw.SmartShooter.plist
'Hart' is the company name as registered with Apple, and 'com.hartcw.SmartShooter' is the app identifier name, so I think this is what Apple checks against.
Also there were a couple of things I had to do regarding the plist file, see http://hartcw.com/francis/qt-and-the-mac-app-store
Infact it was accepted first time by Apple! It was in the 'waiting for review' stage for about 10 days, then transitioned to 'in review' for about 4 hours, and then went live on the app store.

Using Qt is no problem at all for creating an app for the App Store. All you have to do is to make sure that you are using Qt compiled with Cocoa and not Carbon.
EDIT: I've just found that there may be an issue if your application uses Qt plugins (as this apparently makes Qt write to ~/Library/Preferences/com.trolltech.plist which is outside the 'domain' of an App Store application.)

Related

No QAudioDeviceInfo::availableDevices on Windows

I'm using Visual Studio 2015 Community to make a Qt-based GUI in C++ which includes a microphone input. I'm testing the microphone part, and am looping through QAudioDeviceInfo::AvailableDevices(QAudio::Mode::AudioInput) (and AudioOutput for that matter) and nothing is coming up. I've checked that my project includes QtMultimedia, and I definitely have audio devices on this computer. I'm stuck with an existing compiled Qt (since this application is plugging into another project), but I've verified that the Qt install has the QtMultimedia and the Windows audio plugins. The Qt version is 5.9.3.
The only thing I can think of is that the project isn't including the right plugin, but I don't know how to change that.
The issue was that I needed to run "windeployqt" on the built executable to get all of the plugins into the right place. I'm curious why it didn't work without that, but that's a VS + Qt plugin problem, not a Qt problem.

Qt C++ application: self autostart installation in Linux

I'm porting some Qt Windows/VC++ code to Linux/GCC. The application can add it's own shortcut to the Windows Autostart folder so the application starts after login.
I want to do the same in Linux. I'm using Kubuntu 15.10 but the solution should work for virtually all (or at least most) Linux variants out there. And it should work without super user rights (or it should request the rights automatically).
I searched the web and found two solutions:
Add a desktop entry file to $HOME/.config/autostart
Add a symbolic link to /etc/init.d/
Will they both work in all Linux distributions? What are the differences? Which is to be preferred?
Also I would like to know if I should do that by programmatically running a shell command or if there is some native API I could use in C/C++ (including easy error detection).
I have put project in GitHub for managing auto-start feature in different OS. It's written in Qt.
Please check it and let me know if you have any problem using it:
https://github.com/b00f/qautostart
You can add application in various ways.
Via linux init system. For newest linux OS systemd is a standard. In this case your need to create systemd unit for your application
Via desktop manager, such as gnome, kde and possible others. In this case you need also create specification for autostarting your app.
Via bash files
I think, prefered way via systemd unit, because now this is standard way for starting process at boot time and for special user, if need.

Qt camera example does not find the laptop's webcam

I'm using Debian Jessie and dmesg | grep video returns:
[ 22.280407] Linux video capture interface: v2.00
[ 22.790704] uvcvideo: Found UVC 1.00 device Lenovo EasyCamera (13d3:5170)
[ 22.796546] usbcore: registered new interface driver uvcvideo
The example compiles fine but upon launch i get a dialog telling me that the camera service is missing. I'm using Qt 5.5.0. This question points to a similar issue but it's for windows. Also I've installed Qt using the installer provided at it's web site. I've tested my webcam with Cheese application and it works but QCameraInfo::availableCameras() returns nothing.
I don't know if this is a definitive answer, but in my experience the dreaded "camera service is missing" comes down to exactly what the message says; for some reason the media back-end that Qt uses to get video input from a camera is broken or miss-configured in some way. In my case I had this problem in the following situations:
1. Building Qt from source
Qt build system SILENTLY DISABLES FEATURES if you don't have all the dependencies that it requires to include them in the build. Make sure to read this official article very carefully for your platform. I lost count of the times this has ruined my <insert favourite period of time such as day/week/year here >, and not only for the multimedia module...
2. Missing some gstreamer packages on my Ubuntu
I develop for Linux & Debian mostly, and on those platforms Qt depends on gstreamer backend. gstreamer is basically a plugin architecture in the core with every single feature added as plugins, and with endless possibilities of manual intervention through configuration files. See where is this is going? Clue: make sure you have all the plugins you want installed and configured properly. Here is a link to some gstreamer tools you can use. Same probably goes for other back-ends on other platforms.
And a pro tip in the end: Since both Qt5.5 gstreamer0.1 (old) and gstreamer1.0 (new) are supported as back-ends, and since Qt5.6 the new one is default. This will give you some room for experimenting, for example if the old does not work, you can try the new etc.
Hope this was useful!

How do I find MS word activeX server binaries and register them?

I am using MS word activeX in my Qt application but it failing to load the documents on some machines running XP.The doc has pointed out that the problem might be related to this:
Note however that the ActiveX server binaries you are using might not be installed on the target system, so you have to ship them with your package and register them during the installation process of your application.
link to the Qt doc
TMy problem is where do I find those server binaries and how do I register them?I would appreciate good pointers on how to get this done.
The passage you cite from Qt documentation only applies if you have the rights to redistribute the ActiveX server you're trying to use. This is common sense, really.
To use the MS Word ActiveX server, the target system must have a copy of MS Word installed. That's all there's to it.

c++ invisible app that launches an exe using native libraries

I'll begin with an apology since I am new to c++ and maybe my questions make no sense.
I have a c# app, unfortunately it requires .Net framework to be installed on the machine.
I'd like to make a c++ application that will copy a .Net installer from a cd, and run the installer on quite mode.
The c++ app must be hidden, no console or what so ever, and also the most important thing is: it must run on a clean install of windows xp/
Please help me :)
I have no idea how to approach this, since I've never used c++ before.
P.S. (if it's possible to run a c# app that can do the above, saying how would be appreciated).
I tried googling but failed to get an answer
I dont know why you want to have a c++ app to launch the dot net installer. This can be achieved from within DOT NET env itself.
Add a Setup project to your current solution. It can detect installed .net framework and depending on your application's dependencies can offer to install one automatically.
However by default it will try to download the framework but if you intend to supply it on your CD you can configure it to pick up the installer from a local location as well.
Refer here to get you started
http://support.microsoft.com/kb/307353