QTableView printing
I am new on QT an I try to print out from QTableView How can I do this? Thank a lot ...
I am new on QT an I try to print out from QTableView How can I do this? Thank a lot ...
Okay, so this might be a bit of an academic question. Can someone tell me if/how C++'s casting operators might translate to Objective-C... or how/why they're not necessary? I've been out of the loop with C++ for a few years now and it seems like every time I turn around they add a few new keywords. I was recently introduced to C++'s v...
I have a function, void test( vector<int>& vec ); How can I set the default argument for vec ? I have tried void test( vector<int>& vec = vector<int>() ); But there's a warning "nonstandard extension used : 'default argument' : conversion from 'std::vector<_Ty>' to 'std::vector<_Ty> &'" Is there a better way to do this ? Instead...
Hi, I have a text file with some strings in it, I am able to access the text from the file by using [NSString initWithContentsOfFile] function but what I want to do next is remove the whole text from that file but leaving the text file there as my application will continue to feed strings of message into the file. I've looked through NSS...
Hi, A while ago I found a library that allowed calling individual built-in Perl functions in C++, I cannot find it now. Can you tell me where I can find it on the net? Thanks. ...
Hello, I have an application, which has a (Qt C++) singleton logger class. The GetInstance() implementation is: if(m_Instance == NULL) { try { m_Instance = new Logger(); } catch(...){} } return m_Instance; Now I have following macro in the .h file: "#define LOG Logger::Instance()->Log" Everything is fine as l...
I need to write a dynamic link library in C++ that is used by Java on Android. As I get, it should be .so library, but I don't know how to do that. I tried Cygwin, but it crashes: $ gcc 1.cpp /usr/lib/gcc/i686-pc-cygwin/4.3.4/../../../../i686-pc-cygwin/bin/ld: cannot find -luser32 collect2: ld returned 1 exit status 1.cpp: ...
I'm creating a simple server which stores several variables globally. On occasion these variables will update and during this time the variables are locked from other threads. Each client who accesses the server is granted their own thread, but has no way to change these variables and are essentially readonly. My question to the internet...
I have to read lines from an extern text file and need the 1. character of some lines. Is there a function, which can tell me, in which line the pointer is and an other function, which can set the pointer to the begin of line x? I have to jump to lines before and after the current position. ...
If you had to decide between C# and Managed C++, which would you choose and why? Are there benefits of Managed C++ over C#? Which language do you prefer? What decisions would you make under what circumstances? ...
Hello, all. I have a large, crossplatform, python-dependent project, which is built by CMake. In linux, python is either preinstalled or easily retrived by shell script. But on windows build, i have to install python manually from .msi before running CMake. Is there any good workaround using cmake scripts? PS All other external dependen...
Hello i have txt file which contents is this \u041f\u0435\u0440\u0432\u044b\u0439_\u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439_\u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442_\u043a\u0430\u043d\u0430\u043b how can I read such file to get result like this: "Первый_интерактивный_интернет_канал" If i ty...
Possible Duplicate: Threading books for C++ Are there any good C++ books that deal extensively with multithreading and synchronization? I've had a quick look at Windows via C/C++, which may be good, but you may know other better ones. Thanks. Edit - Some books that have been suggested by others or that I found to be good: ...
I've created a connection point interface _IPlayerEvents. I've added a couple of methods OnConnect() OnDisconnect() I've built the project, and VS2008 has generated code in the CProxy_IPlayerEvents class: HRESULT Fire_OnConnect(){...} HRESULT Fire_OnDisconnect() {...} Now I've added a further method to the _IPlayerEvents interface...
Here's the basic problem: I have about 10,000 word documents that contain blocks of data. Each block is numbered and also has an accompanying image. I need to somehow store these individual blocks to a db as images (text would be great, but read note below), without the numbering. I can go through and have typists mark the beginning and...
[edit] For background reading, and to be clear, this is what I am talking about: Introduction to the volatile keyword When reviewing embedded systems code, one of the most common errors I see is the omission of volatile for thread/interrupt shared data. However my question is whether it is 'safe' not to use volatile when a variable is ...
Hi! I'm working on a ia64-machine using ICC 11.1. The following program compiles nicely: #include <pthread.h> #include <iostream> using namespace std; int main() { cout << PTHREAD_STACK_MIN << '\n'; return 0; } When I compile it with icc test.cpp -o test BUT when I change the contents of the file to to: #include <pthread.h> ...
Hello, Currently I'm using singleton pattern for certain global objects in my application (Qt application for Symbian environment). However, because of some problems (http://stackoverflow.com/questions/3147375/c-checking-singleton-pointers/3147806#3147806) it looks like that I have to change the logic. I have 3 classes (logger, setting...
In Qt's qrect.h I found class declaration starting like this: class Q_CORE_EXPORT QRect { }; As you can see there are two identifiers after class keyword. How shall I understand this? Thank you. ...
Hi. Here's what I thought of doing : A - Structure { Position Name } B1 - Vehicle { Fuel } B2 - Building { -nothing- } foo - Car foo2 - Truck bar - Hospital bar2 - Market It's impossible to declare constructors like the following since A is not the direct base class : foo(x,y,z):A(x,y,z) bar(a,b,c):A(a,b,c) So I tried doing...