Search Results

Search found 1708 results on 69 pages for 'qt'.

Page 11/69 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Use Google Test from Qt in Windows

    - by Dave
    I have a simple test file, TestMe.cpp: #include <gtest/gtest.h> TEST(MyTest, SomeTest) { EXPECT_EQ(1, 1); } int main(int argc, char **argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } I have Google Test built as a static library. (I can provide the makefile if it's relevant.) I can compile TestMe.cpp from a command-line with no problem: g++ TestMe.cpp -IC:\gtest-1.5.0\gtest-1.5.0\include -L../gtest/staticlib -lgtest -o TestMe.exe It runs as expected. However, I cannot get this to compile in Qt. My Qt project file, in the same directory: SOURCES += TestMe.cpp INCLUDEPATH += C:\gtest-1.5.0\gtest-1.5.0\include LIBS += -L../gtest/staticlib -lgtest This results in 17 "unresolved external symbol" errors related to gtest functions. I'm pulling my hair out here, as I'm sure it's something simple. Any ideas?

    Read the article

  • How can let Qt Graphics View Framework support custom layers

    - by jnblue
    Qt's graphics view frameworks is very powerful, but I have not found a way to support custom layers. In Qt, there is a QGraphicsScene::ItemLayer,but QGraphicsScene renders all items are in this layer. I want manage the items with several layers, Just like Illustrator and CorelDraw. all the item only in the current layer will receive the event, be selected or get the key focus etc.. Other layers(not current layer) will not receive all scene event. The most reasons of using layers is I could catalogue a large number of items more clearly.And without needing transfer events to all the layers' items ,I think the graphics frameworks will be more efficient. The last question, does QGraphicsView support rendering server stacked graphics scenes at the same time? If support, I think the "custom layers" can be solved in this way. Thanks very much!

    Read the article

  • Qt Serial Port Errors - Data not getting read

    - by user2970546
    I'm trying to read a serial port with the Qt SerialPort library. I can read the data using HyperTerminal. In Qt I used the following code to try and do the same thing. Qt says the the port has been opened correctly, but for some reason, the bytesAvailable from the serial port is always 0. serial.setPortName("COM20"); if (serial.open(QIODevice::ReadOnly)) qDebug() << "Opened port " << endl; else qDebug() << "Unable to open port" << endl; serial.setDataBits(QSerialPort::Data8); serial.setParity(QSerialPort::EvenParity); serial.setBaudRate(QSerialPort::Baud115200); qDebug() << "Is open?? " << serial.isOpen(); // Wait unit serial port data is ready while (!serial.bytesAvailable()) { //qDebug() << serial.bytesAvailable()<<endl; continue; } QByteArray data = serial.read(100); qDebug() << "This is the data -" << data << endl; serial.close(); In comparison, MATLAB code with the same structure as the above code, successfully manages to read the serial port data %Serial Port Grapher - Shurjo Banerjee s = serial('COM20'); s.BaudRate = 460800; s.Parity = 'even'; try input('Ready to begin?'); catch end fopen(s); fh = figure(); hold on; t = 1; while (s.BytesAvailable <= 0) continue end a = fread(s, 1) old_t = 1; old_a = a; while true if (s.BytesAvailable > 0) a = fread(s, 1) figure(fh) t = t + 1; plot([old_t t], [old_a a]); old_t = t; old_a = a; end end fclose(s);

    Read the article

  • Memory leak in Qt signal and slots

    - by Ajay
    Hello, I am running valgrind on my Qt code,and even on successful exit of the application, get the following report from valgrind 8,832 bytes in 92 blocks are still reachable in loss record 12 of 12 at 0x4025390: operator new(unsigned int) (vg_replace_malloc.c:214) ==3339== by 0x4B75F05: QMutex::QMutex(QMutex::RecursionMode) (qmutex.cpp:123) ==3339== by 0x4B77602: QMutexPool::get(void const*) (qmutexpool.cpp:137) ==3339== by 0x4CA0EC2: signalSlotLock(QObject const*) (qobject.cpp:112) ==3339== by 0x4CA3939: QMetaObjectPrivate::connect(QObject const*, int, QObject const*, int, int, int*) (qobject.cpp:2900) ==3339== by 0x4CA5C00: QObject::connect(QObject const*, char const*, QObject const*, char const*, Qt::ConnectionType) (qobject.cpp:2599) I disconnect all signal connections and also delete the objects. The above mentioned leak increases if i increase the amount of signal and slot connections? Can anybody help with this?

    Read the article

  • Symbian qt threading

    - by Umesha MS
    Hi, 1) In symbian c++ thread is not recommended. Instead of that they recommend active object for multi tasking. Presently I am using QT to develop a application in symbian. Since there is no active object in QT I thought of using thread. My question is , can I use thread, is it is recommended. If it is not recommended, how to achieve multitasking. 2) I have created a sample thread class as shown bellow. When I call test function from the constructer of the main window thread will start but UI will be in hung state, infact main window itself will not be displayed. Please help me to solve the problem. class CSampleThread: public QThread { Q_OBJECT public: CSampleThread(QObject *parent = 0) : QThread(parent) {} virtual ~CSampleThread() {} void test(){ QThread::start(LowPriority); } protected: void run() { while(true){} } };

    Read the article

  • How can I link glibc statically with qt

    - by yan bellavance
    I have built a static version of qt and download a static version of glibc. Now I would like to link glibc statically to my qt application. I know about going into the .pro and adding the line LIBS += -L path/to/static_lib but I am wondering if these that is enough? Will it still link glibc statically even though the OS I am building on has the dynamic libraries also? The reason I am doing this is to deploy the application in a standalone manner. (After installing and updating Red Hat 5.3 glibc_2.9 was not found on the target computer)

    Read the article

  • FFmpeg and qt, Unable to find a suitable output format for '>'

    - by Spredzy
    Hi all, I'm trying to execute a ffmpeg operation through Qt I would like to execute this line : ./ffmpeg -t 10 -i temp1 -f mpeg - > temp2 When I execute through the terminal, it works perfectly fine. How ever when I launch it through Qt like this : QProcess *process = new QProcess(); QString parameters("./ffmpeg -t 10 -i temp1 -f mpeg - > temp2"); std::cout << process->execute(parameters) << std::endl; I get an Unable to find a suitable output format for '>' any body has the idea of why ?

    Read the article

  • Qt LGPL licencing for a free application with closed source

    - by Andy M
    Hey everyone, I'm working on an application developped with Qt 4.6.2. I'm linking dynamicaly and I don't want to share my source code. The application is totally free and I don't plan on selling any part of it. I did not make any changes in the Qt library, I'm only using it to develop the application... I just want to share my free application, without having to share the source code... My question is, what would be your advices in choosing the correct licencing ? Thanks in advance for your answers !

    Read the article

  • How to provide Input to Dialogs designed by Qt Designer

    - by GG
    Hello, I am a Qt beginner and working with Qt Designer to develop some small UI elements. I read http://doc.trolltech.com/4.5/designer-using-a-ui-file.html to use these GUI elements in my code and using multiple inheritance approach. I am introducing bookmark feature which somewhat look like http://img293.imageshack.us/img293/3041/screenshotyb.png. Now the problem I am facing is How can I show all existing bookmark folders in the drop down(say folders are in a QVector). So my main problem is how can I pass some inputs to the UI element. I think I'm clear, please let me know if further explanation is required. Sorry for adding links directly, rich formatting in my browser is not working. Thanks in advance,

    Read the article

  • Check whether a string is a valid filename with Qt

    - by ereOn
    Hi, Is there a way with Qt 4.6 to check if a given QString is a valid filename (or directory name) on the current operating system ? I want to check for the name to be valid, not for the file to exist. Examples: // Some valid names test under_score .dotted-name // Some specific names colon:name // valid under UNIX OSes, but not on Windows what? // valid under UNIX OSes, but still not on Windows How would I achieve this ? Is there some Qt built-in function ? I'd like to avoid creating an empty file, but if there is no other reliable way, I would still like to see how to do it in a "clean" way. Many thanks.

    Read the article

  • Getting Parent Layout in Qt

    - by Austin
    Hi, quick question. Is there any way to (easily) retrieve the parent layout of a widget in Qt? PS: QObject::parent() won't work, for logical reasons. EDIT: I'm positive the widget has a parent layout, because I added it to a layout earlier in the code. Now, I have many other layouts in the window and while it is possible for me to keep track of them, I just want to know if there is an easy and clean way to get the parent layout. EDIT2: Sorry, "easy and clean" was probably not the best way of putting. I meant using the Qt API. EDIT3: I'm adding the widget to the layout like this: QHBoxLayout* layout = new QHBoxLayout; layout-addWidget(button);

    Read the article

  • Problem with displaying graphs on a Qt canvas

    - by Michal Nowotka
    Let's say I'm a Qt newbie. I want a good Qt library for displaying simple graphs. I've found the quanava library. But there is a problem. When I compiled a basic example it looks like graph edges are not painted properly when moving nodes. I don't have any idea where is a bug but this code seems to be rather simple. I think this is a problem with paint method in NodeItem class. Maybe someone has already solved this problem because this library is quite popular.

    Read the article

  • qmake -project command gives QFileInfo warning in Qt 4.6

    - by Pilgrim
    I've upgraded to Qt 4.6 on my Mac (OS 10.5). When I go to a project directory and run: qmake -project Qt returns this warning (although it doesn't say it's a warning, I assume it is since the .pro file gets created anyway): QFileInfo::absolutePath: Constructed with empty filename I did a completely new install thinking that the "upgrade" wasn't clean for whatever reason, it still does it. Any ideas as to why? Here is an example .pro that results from above command: ###################################################################### # Automatically generated by qmake (2.01a) Mon Apr 19 07:39:53 2010 ###################################################################### TEMPLATE = app TARGET = DEPENDPATH += . INCLUDEPATH += . # Input HEADERS += mainwindow.h SOURCES += main.cpp mainwindow.cpp RESOURCES += jquery.qrc

    Read the article

  • Deploying Qt / MySQL application

    - by canardman
    Hi everyone, I hadn't found a anwser on the web, so i ask to you. I am unable to run my compiled mysql driver on a deployment solution. On the pc A the app work fine when run with QtCreator, but via the .exe in the following working directory, the driver is not loaded : root/ -----/bin --------/app.exe --------/libgcc_s_dw2-1.dll --------/mingwm10.dll --------/QtCore4.dll --------/QtGui4.dll --------/QtSql4.dll -----/sqldrivers --------/libmysql.dll --------/qsqlmysql4.dll Whereas with libmysql.dll under bin/ driver is loaded. Now on the pc B, with no Qt or MySQL lib installation and with any of the 2 last working dir, the driver is not loaded. pc A : Qt 4.7 2010.05, Win 7 pc B : Win 7 Thanks for your help !

    Read the article

  • how to create a theme with QT

    - by Moayyad Yaghi
    hello im looking for a way to make my pyqt interface look nicer by adding a theme to it. im new to Qt and i still have no idea how to add a custom theme for widgets.. so how is that possible ? and is it possible through qt designer ? sorry for my bad english , its my third language. i hope the idea is clear enough . please let me know if something was unclear .. thanks in advace

    Read the article

  • How to repaint another Qt class

    - by RR
    Hi all, I'm a new bit in Qt... I have a Qt GUI application (written by me), let's call it QtAPP.exe When QtAPP.exe running, I will use a QThread and QProcess to execute some external file, such as player.exe (written in native C). Here's my question: In QtAPP.exe, there are 2 classes, 1. QMainWindow - Core of QtAPP.exe 2. QThread - A thread class to execute external things For now, if I got a finished() signal in that QThread, how do I to force the QMainWindow to repaint itself ? Hope somebody can show me some tips, maybe sample code :) Any suggestion are welcome~

    Read the article

  • Problems adding static library QT project

    - by Smek
    I have problems adding a static library to my Qt project. I have two project one is my static library and the other one is a Qt GUI project. As I add all classes to my GUI project as c++ or header files everything works just fine but I want this to be in a separate library. When I select the option to add a library I check External library then I select the .a file I have build and the folder where my header files can be found because I am working on a Mac I select Mac as the target platform. Then I click continue and then done. macx: LIBS += -L$$PWD/../../MyLib/build-MyLib-Desktop_Qt_5_2_1_clang_64bit-Debug/ -lMyLib INCLUDEPATH += $$PWD/../../MyLib/build-MyLib-Desktop_Qt_5_2_1_clang_64bit-Debug/include DEPENDPATH += $$PWD/../../MyLib/build-MyLib-Desktop_Qt_5_2_1_clang_64bit-Debug/include macx: PRE_TARGETDEPS += $$PWD/../../MyLib/build-MyLib-Desktop_Qt_5_2_1_clang_64bit-Debug/libMyLib.a When I build my GUI project I get the following error: The process "/usr/bin/make" exited with code 2. Can anyone tell me what the problem can be and how to resolve the problem? Thanks

    Read the article

  • Documentation for Qt documentation comments? Qt + Doxygen?

    - by Jake Petroules
    Where can I find documentation for Qt documentation comments? I'm referring to how Qt uses a specific style for documentation comments, like so: /*! \class MyClassName \brief The MyClassName class is used as an example on Stack Overflow. This class serves a few functions, the most important being: \list \i So people can understand my question. \i So people can have a few laughs at the comedy in my example. \endlist */ ...you get the picture. So where can I find information about all the switches, like \class, \list, \brief, etc. Also, what tool(s) do I use to generate documentation files from these comments in my source files? Does Doxygen support this syntax?

    Read the article

  • Qt applications on new Mac App Store

    - by PDI
    I have a Qt app that runs on OS X that has potential to go on the new Mac App Store. I have reviewed the guidelines at https://developer.apple.com/appstore/mac/resources/approval/guidelines.html. I also saw a post here on SO about Java and the AppStore. Has anyone else considered this with their own apps and whether or not the Qt framework will run afoul of the App police? You still have to stay within the Apple HIG, i.e. no theming and cannot use private APIs. Still seems like a risky proposition over pure ObjC. Anyone else tempted?

    Read the article

  • Does Qt support virtual pure slots ?

    - by ereOn
    Hi, My GUI project in Qt has a lot of "configuration pages" classes which all inherit directly from QWidget. Recently, I realized that all these classes share 2 commons slots (loadSettings() and saveSettings()). Regarding this, I have two questions: Does it make sense to write a intermediate base abstract class (lets name it BaseConfigurationPage) with these two slots as virtual pure methods ? (Every possible configuration page will always have these two methods, so I would say "yes") Before I do the heavy change in my code (if I have to) : does Qt support virtual pure slots ? Is there anything I should be aware of ? Here is a code example describing everything: class BaseConfigurationPage : public QWidget { // Some constructor and other methods, irrelevant here. public slots: virtual void loadSettings() = 0; virtual void saveSettings() = 0; }; class GeneralConfigurationPage : public BaseConfigurationPage { // Some constructor and other methods, irrelevant here. public slots: void loadSettings(); void saveSettings(); };

    Read the article

  • Basic QT Event handling / Threading questions ?

    - by umanga
    Greetings , I am new to QT (4.6) and have some basic questions regarding its event mechanism.I come from Swing background so I am trying to compare it with QT. 1) Does Event-processing-loop run in seperate thread? (like EventDispatch thread in Swing) ? 2) If we open several 'QMainWindow' do they run in several threads? 3) Whats the best way to run an intensive process in a seperate thread? (like SwingWorker in Swing ? ) 4) If intesive-process runs in a seperate thread ,is it possible to call UI methods like update(),repaint() from that process? thanks in advance.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >