cross-platform

Python: Open Thunderbird to write new mail with attached file

帅比萌擦擦* 提交于 2019-12-20 02:42:08
问题 I would like to open Thunderbird on Debian AND Windows with an attached file for a new email. So I would like to do the same as in this thread but the posted solution does not work: Python open email client with attachment I have the very same problem as user2686223. The file will not be attached to the mail. Can anyone help me with this? Maybe with another solution? EDIT: This is now how it works: import os os.system("thunderbird -compose to='test@test.de',subject='subject',body='body'

Qt Cross-platform Windows & Mac: Font size

被刻印的时光 ゝ 提交于 2019-12-20 02:32:31
问题 I'm developing an application on Windows and OS X, with Qt framework. The problem is that I have manually set up the font size for some widgets (in the ui designer). Under windows, the fonts are perfect, but on osx, they are too big. Indeed, the font families are converted (MS Shell Dlg 2 to Lucida Grande), but not the font size, if they have been manually set. So I decided to decrease the font size in the code, with some #ifdef, like this for example: #ifdef Q_OS_MAC QFont font = ui->button-

How return a std::string from C's “getcwd” function

≡放荡痞女 提交于 2019-12-20 01:58:35
问题 Sorry to keep hammering on this, but I'm trying to learn :). Is this any good? And yes, I care about memory leaks. I can't find a decent way of preallocating the char*, because there simply seems to be no cross-platform way. const string getcwd() { char* a_cwd = getcwd(NULL,0); string s_cwd(a_cwd); free(a_cwd); return s_cwd; } UPDATE2: without Boost or Qt, the most common stuff can get long-winded (see accepted answer) 回答1: If you want to remain standard, getcwd isn't required to do anything

C++ loop until keystroke

夙愿已清 提交于 2019-12-19 08:17:08
问题 If I want to loop until a keystroke there is a quite nice Windows solution: while(!kbhit()){ //... } But this is neither an ISO-Function nor works on other Operating Systems except MS Win. I found other cross-plattform solutions but they are quite confusing and bloated - isn't there another easy way to manage this? 回答1: You can use the next version of kbhit() for *nix OSes: #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <termios.h> #include <unistd.h> #include <fcntl.h>

Building Cross Platform app - recommendation

岁酱吖の 提交于 2019-12-19 07:56:59
问题 I need to build a fairly simple app but it needs to work on both PC and Mac. It also needs to be redistributable on a disc or usb drive as a standalone desktop app. Initially I thought AIR would be perfect for this (it ticks all the API requirements), but the difficulty is making it distributable, as the app would require the AIR runtime to be installed to run. I came across Shu Player as an option as it seems to be able to package the AIR runtime with the app and do a (silent?) install.

CMake Generator for Visual Studio Linux cross-platform

时光毁灭记忆、已成空白 提交于 2019-12-19 06:43:09
问题 I want to generate a Visual Studio Solution for a cross-platform Linux Project from a CMake Project. The Visual Studio 2017 cross-platform workload works nicely, especially when it comes to debugging. I use it to target the WSL. Now I have an existing Linux CMake project that I want to develop on Windows and Visual Studio and build it on WSL. I just don't seem to see a way of generating an appropriate Solution for Visual Studio. Can anyone enlighten me? 回答1: There were already some queries to

Xamarin Forms Sharedpreferences cross

瘦欲@ 提交于 2019-12-19 05:17:41
问题 I'd like to know what is the best solution to manipulate application settings in a cross-platform way. In iOS we can change the settings outside the app in the settings screen, but we don't have that in windows phone and android. So, my idea is to create a normal page/screen inside the app that shows all my application settings and have an interface with Save() and Get() methods that I can implement specific per device using DependencyServices. Is this the right way to do it? 回答1: The

Cross platform Mobile development framework for NFC's

∥☆過路亽.° 提交于 2019-12-19 04:38:06
问题 I want to create an application for several mobile platforms (android, BB, iOS etc) which has the capability to use nfc peer to peer functionality. (for example, to read/write to a nfc reader/writer). I looked at mosync (because it allows us to write C/C++ code which i'm comfortable with) but their API does not specify anything about peer-to-peer nfc. It only supports read/write to/from nfc tags. So, which is the best platform that i can use to fulfill this need? (by best i mean flexible and

SWT-like GUI toolkit for C or C++

让人想犯罪 __ 提交于 2019-12-19 04:05:02
问题 Do you know any cross-platform GUI toolkit like swt for C (using default widgets in each operating system = right pics on eclipse.org/swt) ? There is an implementation of swt for D language called DWT but I need it for C or C++. Thanks. 回答1: Qt (community) wxWidgets FLTK GTK+ FOX Notus VCF - EDIT2 seems to be inactive for a few years You can read some details in that wiki. First 4 are pretty popular, the rest I dont know. EDIT: 8. There is C++ port but it seem Windows only for now 9. SWT/Fox

How can I include platform-specific native libraries in the .JAR file using Eclipse?

瘦欲@ 提交于 2019-12-19 03:09:07
问题 I am just starting to learn JNI. I have been following a simple example, and I have created a Java app that calls a Hello World method in a native library. I'd like to target Win32 and Linux x86. My library resides in a DLL, and I can call it just fine using LoadLibrary when the DLL is added to the root of my Eclipse project. However, I can't figure out how to get Eclipse to export a runnable JAR that includes the DLL and the .SO file for Linux. So my question is basically; how would you go