Qt Creator won't allow me to run GUI Application - linux

I am currently using Qt Creator on Ubuntu Linux 12.10, and I have just started a Qt GUI application. When I click the design tab, I come to this screen:
As you can see, the Build and Run buttons on the bottom left are greyed out, and I don't understand why. I have searched across the web already, and have found nothing. Can anybody give me a clue as to why this is happening? Have I done something wrong?
My QT Creator version is:
Qt Creator 2.5.2
Based on Qt 4.8.2 (64 bit)
Built on Aug 19 2012 at 15:28:17
The only reason that I switched to Qt Creator is that Qt Designer cannot build applications, or edit their source code. Are the two meant to be used together? If so, how?

You are in the "design" realm, goto the "edit" or "debug" pane.

By looking at the little computer-shaped icon, just above the run, debug and build buttons on the bottom left corner, it seems to me that either you may have not set up a version of the Qt properly, or you haven't selected one at all. Therefore no compilation is possible
If you have installed the Qt Libraries, then you will need to "add" them to the QtCreator properteies.
In QtCreator go to Tools->Options-> Qt (or Qt Versions) and add a valid version of the qt libraries by selecting the path to the appropriate qmake.
If you are still having issues, I would recommend installing the Nokia-QtSDK, as it bundles the Qt libraries for different platforms (Desktop, Meego, Symbian, etc.) and it requires no extra set up.

Looking at the title bar of Qt Creator it looks like you only created (or opened) a .ui file. To compile something you need a project (a .pro file). Click File -> New and choose Application -> Qt Gui Application.

Check whether you have configured the tool chains required. You will need to provide paths for gcc compiler and qmake for building applications from Qt Creator. Check the settings in Tools->Preferences.

Related

Libadwaita on windows 10 & 11

I am new to GTK development. I started using GTK4 and it is really grea. As far as I understand libadwaita is used for reflecting dynamic system changes of colors (light/dark/contrast, etc) in a GTK4 application. This is system solution and if so, I think it's great. Instead of having custom based stylesheets the application will behave according to the system settings. At least on Linux.
My question is: is Libadwaita available for windows systems (my app should react on system changes on windows 10 & 11, as well) and if awailable how to use it? Github for libadwaita constains an example how to create application (HelloWorld) but it is disabled for MS Visaul Studio.
Is libadwaita only for Linux? If so, how to keep code portable?
Yes it is, for Visual Studio 2015 or later on the libadwaita-1-1 and later branches. Be sure to pass in -Dc_std=c99 if using VS2017 or 2015, and use -Dvapi=false unless you have Vala installed when you run Meson to configure the build (the dependencies should be aligned with GTK-4.6+) Run Ninja, and you should be good to go.
The sample program was (purposely) not updated to build with Visual Studio, but there is still adwaita-1-demo.exe that is being built.
The “system settings” would, by the way, depend on how you set up things via GSettings, which would in turn be done in the system registry. You need to install the gsettings-desktop-schemas package (it is also built with Meson and works with Windows), and run gsettings set org.gnome.desktop.interface color-scheme prefer-dark, and you would get the dark theme that you were asking for.
Hope this helps.

What is the procedure to integrate cross toolchain with Redhawk IDE?

Following "How to run waveform developed in REDHawk IDE in my target board ( Zedboard by Xilinx)?", a custom OS is developed using Yocto and Redhawk recipes and installed it in Zedboard. SCA application is being developed using Redhawk IDE installed in development PC. To run the same application in custom OS, a cross-toolchain is generated for that environment using "bitbake redhawk-base-image -c populate_sdk" command (source: https://www.yoctoproject.org/docs/1.6/adt-manual/adt-manual.html). Idea is to develop the application in development PC and build it with cross-toolchain. So, now what is the procedure to integrate cross toolchain with Redhawk IDE?
The Yocto Project provides some tooling for this.
There is little experience in the community with customizing the build-chain in the REDHAWK IDE; ultimately you just want to research updating the build chain in the Eclipse CDT which can you find information about on-line.
The following is provided as a possible approach (one that hasn't been tested). The current build-chain for the REDHAWK IDE is completely based on the generated build scripts that are a part of all REDHAWK projects:
"build.sh all" to build
"build.sh clean" to clean
"build.sh install" to install
You've no doubt noticed this in the console as you've worked with projects in the IDE. So as long as you modify your project to cross-compile when build.sh is getting invoked, the build portion will happen automatically within the IDE. However, it's another matter to get the IDE to understand that your project is referencing files for the embedded board's operating system, and not the native operating system. Here's a rough outline of what I think you'd need to do:
Help -> Install New Software
Under Mobile and Device Development find and install C/C++ GCC Cross Compiler Support
Window -> Preferences
C/C++ -> Build -> Settings
Under Discovery, select CDT Cross GCC Built-in Compiler Settings
Modify the command used to get the compiler specs as appropriate for the embedded platform
Create a new component, get it setup so that when build.sh is run it is cross-compiled for the embedded platform
Project -> Properties
C/C++ General -> Paths and Symbols
Select Includes tab
Select GNU C++
Modify include directories as needed for the embedded platform
C/C++ General -> Preprocessor Includes
Select Providers
Uncheck CDT GCC Built-in Compiler Settings
Check CDT Cross GCC Built-in Compiler Settings

Setup project Cross-Platform with Monogame

I've been trying to figure out on how to setup a Cross-Platform project for MonoGame. Whats the conventional way of doing so ?
Is that done through a Shared Project and can I keep all my content in 1 project ?
Also I am not sure if this information is correct do I need a Mac to build my project for Mac how does that work ? If so how what's the best way of setting that up.
Targeted Platforms : WINDOWS, LINUX, MAC
The best way to setup a cross platform MonoGame project IMO would be to use a Shared project. Shared projects can also include .mgcb file so you won't need to duplicate your content either. How to do:
Use "Xamarin Studio/MonoDevelop" and create a "MonoGame Shared Project" with the name of your game
If you are going to use using "Visual Studio", close the "Xamarin Studio/MonoDevelop" after this, and open up the created project vith it
you are gonna have to include the generated "Content\Content.mgcb" file with build action "None" so it will be visible in Project View area
Add a MonoGame Project for the platform you wish to launch the game from, ie. create a "MonoGame Crossplatform Project" and name it "(gamename).DesktopGL"
Delete "Game1.cs" and "Content Folder" from the Platform project
Add a reference for your Shared project
For your platform project, in options set the Output Assembly Name to be the same as your shared project
this step might not seem important, but if you are using a custom importer/processor this will allow you to not have to compile the content separately for each platform.
There you go, you should be able to run your project now.
Also I am not sure if this information is correct do I need a Mac to build my project for Mac how does that work ? If so how what's the best way of setting that up.
The created executable from DesktopGL project is runnable on Mac even when compiled from Windows, the Mac user just has to launch it using Mono. In case you want you can package your game using MonoKickstart so that your Linux and Mac users don't have to have mono installed: https://github.com/MonoGame/MonoKickstart what's more, it also includes other needed native libraries. Description on how to use it are in the link.
Since you're just targeting Windows, Linux and Mac, you can use Xamarin/MonoDevlop which runs on all three of your target platforms.
Once it's installed, then add the Monogame through the Addin manager. The addin on version 5 of Xaramin and MonoDevlop.
You can then use the same Solution project file between all three platforms assuming you use the OpenGL Template. I use this method for developing between Windows and Linux.
The only time you'll need to use a shared project or something similar would be if you started developing for Mobile (iOS/Android) or for Windows on DirectX instead of OpenGL.

Install driver using InstallShield

I need to create an InstallShield 12 project that installs a driver on WinXP or higher. How can I do it using InstallShield 12?
What we usually do is write a DLL (in C or C++) which uses SetupAPI calls (SetupDiXXX and UpdateDriverForPlugAndPlayDevices) to do all the installation work.
And then, have the installer script(IS, Inno, Wise) make calls into this DLL.
In 2012 Spring Pro (I can't speak to earlier versions), you can simply create a new feature with the desired components (note: use one component for the 64-bit side, and another component for the 32-bit side, both under the same feature). For each of the driver components, go into the Advanced Settings section in the tree view control under the component, then into the Device Driver settings, and on the Common tab, check the "This component includes a device driver" box. Under Runtime Options using DIFx 2.10, set any desired configuration bits, like "Always overwrite any existing device driver", and then at the bottom of the Common tab, be sure to set the appropriate architecture/bittage. Then just let it install -- InstallShield plus DIFx 2.10 take care of everything automagically.
At least, this worked just fine with our custom, signed, WinUSB-based driver. It was a lot harder figuring this out then actually doing it.
I simple way is to wrap dpinst
Use the command line flags to suppress a gui and read the return code to figure out if the install worked correctly

How to set my application's desktop icon for Linux: KDE, Gnome etc?

I have a cross platform program that runs on Windows, Linux and Macintosh. My windows version has an Icon but I don't know how to make have one for my Linux build.
Is there a standard format for KDE, Gnome etc. or will I have to do something special for each one?
My app is in c++ and distributed as source so the end user will compile it with gcc.
If I can have the icon embedded directly inside my exe binary that would be the best.
For Gnome and Kde, you would probably want to include a desktop file with your app that defines how it will be launched. The specification can be found here. If you have an installer included with your app, you would probably want to have it generate this desktop file and put it in the right places to make menu entries and whatnot
If you are using one of the pre-baked F/OSS build systems, such as KDE's CMake support, it's really rather easy once you have a .desktop file:
install( FILES myapp.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
kde4_add_app_icon(myapp_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/hi*-app-myappname.png")
If you are rolling your own, consider using xdg-utils, which includes handy little scripts like xdg-desktop-menu (installs desktop menu items) and xdg-desktop-icon (installs icons to the desktop) for such things.
The .desktop standard was already pointed out in the first comment, though you can also just grab one that is already installed on your system and modify it from there. As for icons, PNGs and SVGs are geerally supported though PNGs tend to give the best results still.
KDE community with it's KDE 4 series started to use CMake as a build system. They developed a CMake macro that knows how to set an icon for your application regardles of the platform (windows (embedded in exe), mac (.app bundles), linux (.desktop files) etc.)
Maybe you can use it.

Resources