Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.9k Posts
  • Extreme Programming with QtTest

    5
    0 Votes
    5 Posts
    5k Views
    M
    Ahem ;-) For the question of how to run the entire test suite in one go, assuming you are using QMake, the correct answer is: If you mark an executable as a test case by adding @ CONFIG += testcase @ to the .pro file, it will be added for execution by the make check target. The test suite is represented by what make check executes, and contains all the unit test binaries marked as a test case. If any of the tests fail, make check returns an error code as expected, so this can be hooked into a CI system. For information on how to set the necessary library paths, see here: https://www.agile-workers.com/web/2012/05/qmake-unit-tests-dynamic-libraries The second question is how to create test executables that contain the application code. There multiple ways to do that. They all depend on the overall application code being written in a way where inter-dependencies are minimized. That is good practice anyway. Your options are: Use a convenience library that contains all application code, and separate the applications main() function from it. Now you can create a test that links this library, and has access to all the code but main(). Create a .pri file that contains all your application sources except main, and include it both for the application and the test. The advantage is that you need no convenience library. The disadvantage is that your sources will be compiled multiple times for each target.
  • [solved] Coordinate (x,y) in replacing the mouse cursor coordinate

    4
    0 Votes
    4 Posts
    2k Views
    L
    [quote author="romeo.rbw" date="1339038853"]Thanks a lot Mr. Anavi... I have another question but may be better I open a new thread. -romeo [solved][/quote] You are welcome :)
  • Deleted

    2
    0 Votes
    2 Posts
    1k Views
    C
    IIRC the partial SOAP v1.1 implementation in the QtSoap component has no knowledge of WSDL which is not part of SOAP but part of a wider web services suite of standards. So, you need to manually interpret the WSDL and code the calls to QtSoap yourself.
  • [solved] a:hover html css in QLabel not working.

    4
    0 Votes
    4 Posts
    4k Views
    J
    Hi, I'm also facing the same problem. Need to change the text color of the QLabel when I hover the text. Please see my below code: @ mylabel->setText("<a > click here </a>"); @ I need to do it using qss file?
  • API design philosophy with smart pointers

    5
    0 Votes
    5 Posts
    3k Views
    U
    I see, in that case this is the proper line of action, I haven't been in such scenario. My approach would be to store airports the airplanes are in inside the plane instance and in the plane destructor go through the airports and remove the plane. That would increase the size of a plane, but by how much? In how many airports can a single plane be at the same time? At any rate, I'd refer planes cleaning themselves up from the airports once deleted instead of checking every time whether a plane has been deleted. bq. How can Airport use smart pointers when it only gets raw Airplane* pointers. Is there a magic way to promote raw pointers to weak/strong references while reestablishing the connection with the original strong reference in AeroCompany? Keep to smart pointers, write a cast operator that casts smart pointer to raw for the constructor that takes a raw pointer, in the body of the cast operator you can do all the extra stuff raw pointer cannot.
  • 64bit Windows compiling

    4
    0 Votes
    4 Posts
    4k Views
    L
    The Windows Platform SDK includes a MSVC compiler as well, which should be also sufficient.
  • [SOLVED] QCombobox + QSqlQueryModel

    3
    0 Votes
    3 Posts
    5k Views
    L
    Well that was easy thanks to my colleague =) In the slot taking care of filtering @QSqlQuery query; bRet = query.prepare("SELECT * FROM modules WHERE productid=:productid"); query.bindValue(":productid", _nProductId); m_pModulesQueryModel->setQuery(query);@ becomes: @QSqlQuery query; bRet = query.prepare("SELECT * FROM modules WHERE productid=:productid"); query.bindValue(":productid", _nProductId); query.exec(); // <--------- Add exec or it won't work m_pModulesQueryModel->setQuery(query);@ So what the documentation does not stipulate is that exec must be called prior to setting the query. Tim, the combox box is automatically populated by the model / view architecture. Practically the only things required are to set a valid query to a QXmlQueryModel object and set that same QXmlQueryModel object to the QComboBox object using setModel. Cheers,
  • Graphics view problem

    2
    0 Votes
    2 Posts
    2k Views
    G
    Hi, there are some errors: @ EERTView::EERTView(QObject *parent) : QGraphicsView(parent) { // making a scene on the application // QGraphicsScene scene; QGraphicsScene *scene = new QGraphicsScene(this); //adding some text to the scene scene.addText("Hello, world!", QFont("Times", 20, QFont::Bold)); // <-- error 1 scene->set.addText("Hello, world!", QFont("Times", 20, QFont::Bold));// <-- error 3 //assigning that scene to the view QGraphicsView view(&scene); // <-- error 2 setScene(view); } @ error 1 is that you call a not existing object error 2 is that you create an object on the stack, add it as widget to the parent. After exiting the function, the object is destroyed again. error 3: What is this set in the call?
  • Qt Designer image background

    7
    0 Votes
    7 Posts
    13k Views
    M
    When posting code snippets, please wrap them in @ tags. Thanks.
  • Port of Q3ListView with Q3CheckListItem and radio-behaviour to pure qt4

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • QlineEdit with selectionChanged()

    4
    0 Votes
    4 Posts
    3k Views
    M
    Thank you it works!!!! sorry it's my fault, public slot: instead of public: in my .h even if you added the functions manually by right clicking on the form and selecting change signals/slots: thank you for your help! Massi
  • Is there a good documantation about lighthouse ?

    8
    0 Votes
    8 Posts
    2k Views
    sierdzioS
    Again, no idea. I remember there was some talk about it on development mailing list, but I don't remember any details. In the meantime, I have found "this":http://qt-project.org/wiki/Qt-Platform-Abstraction.
  • Is Stacked Widget the only option

    14
    0 Votes
    14 Posts
    5k Views
    P
    Yeah I will do .....thanx anyways!!!
  • Save QTreeWidget to file

    4
    0 Votes
    4 Posts
    5k Views
    J
    Thank you, Iĺl try it
  • Qt start up issues

    5
    0 Votes
    5 Posts
    2k Views
    ZlatomirZ
    You can use "Qt SDK 1.1.2":http://www.developer.nokia.com/info/sw.nokia.com/id/84801bfe-8517-4287-9829-014c6f572127/Qt_SDK_1_1_2.html if you need Qt 4.6.3
  • How to include QtGui4.dll into app

    5
    0 Votes
    5 Posts
    4k Views
    L
    You either build a debug version of your application or you build a release version of your application (you can switch between them in the lower left corner in QtCreator, right above the 'Run' button). A debug version of your application is used during development, as it contains additional code and information which allow for better error tracking. When deploying an application, you should always use a release version, as this additional information is of no use to the user, slows down and enlarges your applcation and possibly exposes internal implementation details. A debug version of your application needs a debug version of the Qt libraries (having a d in their name, for example QtGuid4.dll) and a release version of your application needs a release version of the Qt libraries (having no d in their name, for example QtGui4.dll). In addition of beeing tied to the application version, libraries are also tied to toolchain used to build the application. If you build your application using MSVC2008, you will have to use libraries beeing built with MSVC20008 as well, if you build your application using MSVC2010, you will have to use libraries beeing built MSVC2010, and so on. These libraries can be found in the corresponding Qt installation directory, which is usually <where you have installed the SDK>/Desktop/<version>/<toolchain>. So if you build a debug version of your application using MSVC2010 and Qt 4.8.2 you will have to pick the *d4.dll libraries from E:\Programs\QtSDK\Desktop\4.8.2\MSVC2010 (or similiar, I have no Qt SDK installation at hand) and place it in one of the locations I've posted - usually the directory containing the .exe file. Make sure you've read the article I've linked.
  • 0 Votes
    9 Posts
    6k Views
    J
    I changed full read/write permissions on its config files, both .conf/Nokia and QtSDK directory, and the "help" item works Ok now! DerManu, Thanks a lot for your help!
  • [Solved] QSQLQuery Error When Value Not Found

    6
    0 Votes
    6 Posts
    4k Views
    F
    Ok..solved. Using size() to check whether SQLite return any row. Once again thanks for all :-)
  • QProcess and environment

    2
    0 Votes
    2 Posts
    2k Views
    M
    I can't remember offhand, but with using bash in this scenario, do you need to pass in a -i or -l flag? I know bash has rules about which config files are read based on whether it's an interactive, a login, or non-interactive shell. (See man bash for more info.)
  • QTableView::scrollToBottom and performance

    4
    0 Votes
    4 Posts
    4k Views
    M
    okay, figured it out the source of the call, it's called from here: @void QTableView::updateGeometries() { int width = 0; if (!d->verticalHeader->isHidden()) { width = qMax(d->verticalHeader->minimumWidth(), d->verticalHeader->sizeHint().width());@ for each scrollToBottom. So I've hidden the vertical header and now it's looking better.