On Ubuntu the font in the TideSDK console is pretty small. How do I go about changing it? Is there a CSS file or something I need to alter?
According to the TideSDK build instructions for Ubuntu, TideSDK is a GTK2 application.
Thus, you might be able to control the font by setting the default GTK font.
This answer will tell you how to do that. NOTE: if the application explicitly sets a font in code, then this whole answer does not apply.
There might be a way to change the default GTK font setting via some GUI in Ubuntu, but I usually use the rc file method.
That means creating settings files in your home directory that GTK reads.
Here are the GTK related files in my own home directory.
hobbes#metalbaby:~$ ls -al .gtk*
-rw-r--r-- 1 hobbes hobbes 37 Feb 14 11:49 .gtkrc-1.2-gnome2
-rw-r--r-- 1 hobbes hobbes 37 Feb 14 11:49 .gtkrc-2.0
-rw-r--r-- 1 hobbes hobbes 107 May 20 11:45 .gtkrc.hobbes
And the contents of each file:
.gtkrc-1.2-gnome2
include '/home/hobbes/.gtkrc.hobbes'
.gtkrc-2.0
include '/home/hobbes/.gtkrc.hobbes'
.gtkrc.hobbes
style "terminus"
{
font_name = "Terminus"
}
widget_class "*" style "terminus"
gtk-font-name = "Terminus 8"
Note the use of include to apply the same settings to more than one version of GTK application. On my system, this makes emacs and Eclipse use the Terminus 8 font in menus and dialog boxes.
Arch Linux has a wiki page that has a lot of generic information about GTK settings. I don't think that this was the resource I used when creating those files, but nonetheless it is a good resource.
If you are referring to TideSDK Developer as the console, it is simply an app created and bundled using TideSDK. To edit the font size, just adjust the CSS within the app and rebuild it using TideSDK. You can get the sources from https://github.com/TideSDK/TideSDK-Developer, make the changes, import to your existing Developer, build, and you are done. TideSDK Developer is getting a bit old.
You may be not be aware of the new product we are launching shortly. Myself and other core talent from TideSDK have been focusing our efforts on TideKit that has a brand new CLI, app and services to support builds. You can look for the new site to appear at http://www.tidekit.com and follow our developments at http://twitter.com/tidekit. Unlike TideSDK that was only for desktop, TideKit is our new develop once, deploy everywhere solution for developing for mobile, web and desktop from a single source of code in JavasScript. TideSDK apps will be able to be migrated if you have existing code. Here is our promo video: http://youtu.be/aE7gN-d0GhU
Related
When I launch my deployed application from the .exe file the layout is messed up. When I launch the app from Qt Creator, the layout is fine.
Here are the details about how I deployed my app. I am using Qt 5.5 and MinGW 32 bit 4.9.2. I am running Windows 10.
First in Qt Creator I built for release.
Next, I opened the Qt 5.5 for Desktop (MinGW 4.9.2 32 bit) console.
I navigated to my project folder and ran
windeployqt.exe --release ./APPNAME.exe
It copied all the necessary .dll and created some folders as expected.
Now when I run the app, it seems to work just fine. But the layouts are all wrong. Again, when launching the app from Qt Creator it looks great! Proper spacing and sizing of my widgets. When I launch the .exe every thing is smooshed, the ratios of my sliders are all wrong, and some text is hidden because of crowding.
What could cause this bad layout? Am I missing some dependency somehow?
I figured out my own question. The issue was not my build or my layout but that many sizePolicy parameters don't seem to take effect when launching the app from QtCreator. Not 100% sure on the explanation but I think that when launching the .exe the OS is managing interpreting some of those size policy parameters and it does it differently (perhaps more strictly it appears) than QtCreator does. (To be clear I'm not talking about how the app looks in the Design tab. I'm actually talking about launching the app from within QtCreator)
So to fix the appearance of the app I have to play around with the size policies and parameters, build, and then launch the app from the executable.
I would like to create and app using Qt which will use custom files. The app will be available on Windows, OS X and Linux.
The idea is to have a custom icon for my file type (e.g. when you install Adobe's Master Collection, .as, .fla, .ps, etc. files have they own icons).
As far as I know Qt only helps you with app icon. I did not find any kind of support for this kind of problem.
This seems to be an OS problem. Do I need to create scripts to run on app install? (I will be using Bitrock's install builder to provide installers)
How can I achive this behaviour on all OSs?
I have been using Qt for a while on Linux and Windows. However, yesterday I picked up a new MacBook Pro so naturally I've been playing around to see if I could build my Qt apps on Mac.
I got pretty much everything working, however there is one problem : the file size of the resulting app bundle.
I am building my application like this:
qmake -spec macx-g++
make
macdeployqt my.app -no-plugins -dmg
The bundle and everything seem to work fine, but, the generated .app is 31.1 MB large and the .dmg is 13.6 MB!
Is this normal? Can I reduce this horrible size (on Windows, my installer for the same app with all the libraries is ~4 MB)?
If you are using the pre-built Qt libraries then the chances are that they are universal binaries with multiple architectures. For example, do $ file my.app/Resources/Frameworks/QtCore.framework/Versions/4/QtCore and you will see multiple architectures.
You can build your own Qt libraries with only the architectures that you want to support. You may wish to not support PPC because that is ancient; or if you are using a current Qt then you can make the decision of 32 bit vs 64 bit, but that's another question.
The problem is the size of the Qt dynamic libraries, as they must be part of your bundle.
These sizes can usually be reduced.
See the solution of How do I make apps smaller with qmake and macdeployqt on how to do this.
An excellent workaround would be a static build of Qt and linking your application against the static build. This usually is a very good idea as two applications installing Qt dynamically usually crash on Mac OS.
Your application will have with static build (from my exp.) approx. 10-20MB of size. Combined with the steps above, some more reduction might be possible.
I am doing a diff between 2 project versions and noticed that some of the ui files have extra attributes in the xml that I have not put there myself:
where would native="true" come from? what would make it get added to the ui?
Qt GUIs can be displayed in many themes. native="true" forces the application to use the operating system's theme (on Linux, some QT apps look terrible because they don't look like the rest of the native apps).
Whats the best way to deploy a QT app? I've read the documentation hosted at trolltech but is it better to link with a static library or the dynamic libraries and have the user install the framework? I don't really want anyone using my app to have to download a 160mb framework just to run a simple gui frontend.
On OS X it's a good way to do a dynamic build and post-process the resulting ".app" with the macdeployqt tool which comes with Qt starting with 4.5.
This will copy the Qt frameworks used by your application into the application bundle, which results in a larger package than building a static version of your application.
Here is what you can do to make sure you get the smallest file size possibly in a dynamic build:
First off, make sure you only include the stuff you need (in the project.pro file's QT += core gui network xml lines).
Open the application bundle and remove any unneeded "Qt Plugins" from the bundle. macdeployqt automatically compies all the Qt plugins in there, which can be kind of bulky.
Make sure you are building your application in release mode. Otherwise your application might be linked against the debug libraries of the Qt4 framework, and they are really big (for instance, well over 90 MB for the debug library vs. 16 MB of a release variant without debugging symbols). This might be what happened in your case.
If you have a large application binary, you can use UPX to compress your executable file by 40-50%.
Other than that, you should use compressed disk images to deploy your application.
One of my projects uses QtGui, QtNetwork, QtCore and QtXml and the resulting bundle is about 16 MB in size.
Hope that helps.
Unfortunately you will have to include the Qt libraries you need into your own bundle, as you cannot expect your users to have Qt installed on Mac (whereas on Linux packaging systems allow you to require at least a given version of Qt.
There is a nice tool to help you with that, which is called macdeployqt. You just need to invoke it on your bundle application and it will pack the required libraries, changing the linkage of your binary to refer to them. Without it, making bundles for Mac is a real pain (it still is, but considerably less though).
http://doc.trolltech.com/4.6/deployment-mac.html#the-mac-deployment-tool
Afterwards, you can make a .dmg image as you would do with any other app. There is an option in macdeployqt that builds a basic one.
On Linux, it's better to rely on the OS's copy of Qt, as it's almost certainly installed - for OS X, almost all apps use a statically compiled library.