In my usage at least, I sometimes delete my CMake build folder and create a new one, or have multiple build folders (one per computer) but only one source folder (nfs mount).
From what I can tell, QT Creator saves settings into CMakeLists.txt.user inside the source tree, and some others settings into the 'project.cbp' file in the buil...
Below is a small QtJambi code to download contents from a webpage.
public void loadDone()
{
QNetworkAccessManager nm=new QNetworkAccessManager();
nm.finished.connect(this,"done(QNetworkReply)");
nm.get(new QNetworkRequest(new QUrl("http://www.bing.com")));
}
public void done(QNetworkReply reply)
{
QByteArray ba=reply.re...
I've tried the following:
qDebug() << QByteArray("\x00\x10\x00\x00").size();
and i get 0 instead of 4 witch i would espect.
What would be a good data type to hold this 4 bytes of data as i need to later write them to a socket so they must remain exactly like you see them above?
...
take a look at following simple code :
class A;
class B
{
A a;
};
class A
{
B b;
};
int main(int argc, char *argv[])
{
return 1;
}
it does not compile, why ?
Error Message from GCC (Qt):
main.cpp:6: error: field ‘a’ has incomplete type
...
I have one QGraphicsScene as the main scene with several movable QGraphicsItems in it and another QGraphicsScene on top of the main scene as an overlay. The overlay scene is exactly the same size as the user's display,whereas the main scene is much bigger, so it needs to be scrolled up and down automatically.
Well, if an item in the mai...
I have one QTableView object and when I am switching from showIndicators to showIndiValues I am getting this ugly empty header line. Where is the problem?
void DBTableView::showIndicators()
{
enum {
indicators_Id = 0,
indicators_Name = 1,
indicators_CondName = 2,
indicators_MeasureName = 3,
...
I have a communication library built on top of Qt and Google Protocol Buffers. It's currently being built with MinGW/GCC on Windows. My goal is to use the same library in C# on .NET, with the help of a thin wrapper on top using C++/CLI (bridging the unmanaged code with managed code).
I tried using the MinGW produced DLL directly in my ...
I want to navigate QTableWidget in a similar way to MS Excel. e.g. When the user presses the right arrow key while editing a cell, the editing will finish and the next cell to the right will be selected. I have searched the Qt docs, but can't seem to find out how. Can anyone hep? Thanks.
...
hello everyone, I've just begun to study qt using qt-creator, I found some tutorials int which the author doesn't use d'tors at all? is it good practice? or it will be better to manage my objects destruction, thanks in advance
...
I have the following c macro from the libpurple yahoo plugin:
#define yahoo_put16(buf, data) ( \
(*(buf) = (unsigned char)((data)>>8)&0xff), \
(*((buf)+1) = (unsigned char)(data)&0xff), \
2)
I want to implement the same as a function in my class witch would receive as a parameter a quint16 value and return it ...
QT4 How to blur QPixmap image?
I am looking for something like one of the following:
Blur(pixmap);
painter.Blur();
painter.Blur(rect);
What is the best way to do this?
...
Hi,
I want to add items dynamically to QListWidget in Qt.
I have used the following piece of code to add items dynamically, but I am able to add only one item in QListWidget...
for(int i=0; i<5; i++)
{
structLocationDetails[i].strlocationName = metaresult["locationName"];
QString strtemp = structLoca...
Hi,
I have tried with the following code to properly display the direction line between 2 cities, however the line between 2 cities is not properly set. If distance between 2 cities is long enough then one city icon is displayed and to get see the other city icon displayed on the map, I have to go to the place.
please check the code be...
How is it possible to handle "Open link in new window" to open a new QWebPage instead of new window, saving the previous QWebPage in a stack and show the new one with QWebView::setPage()?
I'm new to Qt (and even C++), recommendation on how to fix the stack is also appreciated.
...
Is there an easy way to setup the User-Agent the QWebView class is using?
The only relevant link I found searching was this
http://www.qtforum.org/article/27073/how-to-set-user-agent-in-qwebview.html
I'm learning C++/Qt right now and I don't really understant what's explained on that website. Maybe someone knows an easy way to do it...
I have the following C macro from libpurple:
#define yahoo_get16(buf) ((((*(buf))<<8)&0xff00) + ((*((buf)+1)) & 0xff))
How can i write that as a function that will get as a parameter a QByteArray and retrun a quint16 value using the algorithm in the c macro above?
I've asked a similar question that will convert from quint16 to QByteA...
How can I specify the Unicode character INFINITY (U+221E) in C++ without directly pasting the symbol (∞) into my code file? I've tried \x221e but that results in a warning, and \u221e gives me a LATIN SMALL LETTER A WITH CIRCUMFLEX (U+00E2).
QString label;
label.append(tr("HP: \u221e\n\n"));
...
Just curious. Does anyone have experience with both. My gut feeling is that QT is better for cross platform applications but the UI won't be as slick. Also is QT faster since it compiles to native code with no Virtual Machine? I think also QT is C++ so unmanaged, so there is more chance of memory leaks etc?
If I wanted to develop a non ...
Hey all,
I'm using Qt 4.7.0, a Qtreeview with multiple columns.
What I want to do is "simple" : I want a line to increase its height, when it's selected.
Will delegates be enough to do this ?
I've been through some stuff with a QTableView :
m_pMyTableView->verticalHeader()->setResizeMode(QHeaderView::Interactive);
...
QSize Abstrac...
I want to write a program using Qt that downloads a lot of HTML web pages, about 5000, from one site every day. After downloading that pages I need to extract some data using DOM Query, using the WebKit module, and then store that data in a database.
Which is the best/correct/efficient way to do that, in particular the download and anal...