Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • JMS with Qt

    5
    0 Votes
    5 Posts
    4k Views
    A
    I am using both Windows 7 and Fedora Core.
  • 0 Votes
    7 Posts
    4k Views
    Z
    Thanks for the replies you guys.. I just wanted a very simple encryption (XOR). Just to try it out and see if I could do it because, this (mind you) is my first time working with encryption at all in QT.
  • Bug with QGraphicsOpacityEffect probably?

    2
    0 Votes
    2 Posts
    1k Views
    L
    Reported here: https://bugreports.qt-project.org/browse/QTBUG-25650
  • Crash with QVector and freeing memory?

    7
    0 Votes
    7 Posts
    7k Views
    V
    I am not actually using a timer :) I wish this was the case though! I have an while loop like so: @ void newThread::run() while (t_thread){ // inifinite loop ... // do things ... // do things msleep(18); } } @ I have calculated that it takes about 2 mS to execute the code that I am doing using the Qt mS timer. On application close, I just toggle the boolean and wait for the thread to finish cleanly before I terminate. my background has been C all through school mainly for mp's as well as the linux OS, so the object oriented programming in C++/Qt is new to me this year and i'm still learning "its ways" :) And from what Volker has stated before, does Qt allocate memory differently that what the underlying c++ would do for using standard c++ types (doubles, ints, ect.)? I can understand if the memory was being tampered with, but the memory location of the single double should be able to be read from anywhere, anytime, from whomever if it does indeed exist. I might be wrong since I am not sure what Qt does in the background or how it deals with it.
  • Question about QSharedPointer

    11
    0 Votes
    11 Posts
    13k Views
    D
    I have the same problem with QSharedPointers but soon realized that I was doing this wrong. I have the following situation: There is a Provider object that handles all communication between my program and a remote server. It has a List object which contains several Type objects and is given to other objects. The list is an abstraction to hide the Provider object, meaning I want to use the List object to add/edit/remove the Type objects. Because the Type objects are given to various other objects that are interested (ListViews for example), it is needed to use a QSharedPointer to check if it is being used and if the Type object is still valid. When the Type object itself is changed, it will call a function of the List object which calls a function of the Provider object which will send an command to the server. My first thought was to use a QSharedPointer in the 'changed' functions but realized it would be better to send a plain pointer and let the 'changed' functions determine the QSharedPointer attached to the object. (This was possible because the List object actually creates the Type objects by using new). This way, you don't create a new QSharedPointer to the same object nor do you need a global map but you do use some kind of map functionality by looking up your QSharedPointer. In short: When you want to pass the 'this' pointer as a QSharedPointer, you first pass it on as a plain pointer and then determine the QSharedPointer used to create the object. If this is not possible in your situation, I think you have to change your program or reconsider if using QSharedPointers is the correct way.
  • Local html-images in QTextBrowser

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Library Path

    6
    0 Votes
    6 Posts
    4k Views
    S
    If you need not crossplatform solution u can: @ //add to header file extern "C" IMAGE_DOS_HEADER __ImageBase; #define THIS_MODULE_HINSTANCE reinterpret_cast<HINSTANCE>(&__ImageBase) //Then ::GetModuleFileName(THIS_MODULE_HINSTANCE, szBuffer, MAX_PATH) @ "token from rsdn.ru":http://www.rsdn.ru/forum/winapi/261670.aspx
  • Delete or not?[RESOLVED]

    5
    0 Votes
    5 Posts
    2k Views
    G
    Thanks
  • Adding QByteArray

    20
    0 Votes
    20 Posts
    9k Views
    A
    You really lost me. If you want file encryption, I think there are better ways. Good luck with your project though!
  • [SOLVED]QTreeView setIndexWidget() for child nodes.

    12
    0 Votes
    12 Posts
    18k Views
    S
    Hi stima_ua, This is exactly what i was looking for. Thanks a lot :) Regards Soumitra. Edit: Finally I got something that looks like this :- !http://img138.imageshack.us/img138/583/captureecb.png(exapandCollapse)!
  • [Closed] Brick Breaker help needed

    Locked
    2
    0 Votes
    2 Posts
    1k Views
    A
    Let's continue the discussion in your "other":/forums/viewthread/16888/ topic. Please don't open multiple topics on the same issue.
  • ReadyRead signal of QUdpSocket never emit on windows

    2
    0 Votes
    2 Posts
    2k Views
    T
    I reinstall window xp,and it works!
  • Filtering "NoDotDot" in filesystem model not working

    8
    0 Votes
    8 Posts
    4k Views
    A
    [quote author="Andre" date="1336039264"]Could you tell us, what system you're using?[/quote] its windows 7
  • 0 Votes
    4 Posts
    4k Views
    L
    Ok then, thanks ;)
  • Sending Signals to Non-Qt-Thread - How?

    10
    0 Votes
    10 Posts
    8k Views
    A
    Well, you have to see that - although I wrote that patch - I'm quite a Qt newbie. So for me it is more trouble, since I have to read more code to make sure I do it right. Also none of my "Qt dev mentors" asked for this. So it is like it is, since it meets my needs, but as you know, you are invited to further improve it. ;-) (Although I wouldn't really see this as a Qt property)
  • Update a specific QGraphicsItem by moving other items on scene

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Using qt.conf

    2
    0 Votes
    2 Posts
    2k Views
    L
    The Qt resource system allows you to embed a kind of virtual filesystem within the binary. The path ":qt/etc/qt.conf" does extactly mean what you're suspecting: QLibraryInfo first looks inside the embedded data if the "virtual filesystem" contains a file qt.conf in the path qt/etc/qt.conf - so yes that's the path "inside the executable" the file has to be stored. Mayby this one will help you a bit on this topic: "Qt Resource System":http://qt-project.org/doc/qt-4.8/resources.html
  • How to change sound volume of Qt application

    3
    0 Votes
    3 Posts
    2k Views
    A
    which class are you using to produce sound because as far I know we have to use MediaObject and has to attach volumeslider with it... I am using QWebView and not finding any way to attach it with VOlumeSlider.
  • Converting a desktop application with a GUI to a console application

    5
    0 Votes
    5 Posts
    4k Views
    D
    I complete agree in that a perfect separation of business logic an user interface should make this quite simple but unfortunately this is not the case with "this" application. :-( We have gone a different path and simply created a new path that prevents any user interaction to actually stop the application and wait for user input. This is not perfect but (at least in our case) solves the problem of running the application in batch mode.
  • [SOLVED] QVariant: float, type = 135 broken in 4.8.0 ?

    3
    0 Votes
    3 Posts
    4k Views
    F
    [quote author="1+1=2" date="1335997135"]Can you tell us how do you transfer it?[/quote] My sendMessage Function is the one from the Fortune Client/Server Example, and looking at them again, I found the issue: I recently went to use [code]out.setVersion( out.version() );[/code] in the client while I had not updated the [code]in.setVersion(QDataStream::Qt_4_2);[/code] in the server, changing the in.setVersion and out.setVersion calls to be consistent everywhere fixed the issue. Thank you for pointing me in the right direction, and sorry for making this look bigger than it is. [quote author="1+1=2" date="1335997135"]If you are using QtCreator or Qt addon for MSVC, I think this should be a bug of QtCreator or Qt addon for MSVC.[/quote] I am using the Qt Visual Studio Addin 1.1.10 in Visual Studio 2008 (without SP1). Yes, there might be an issue with the Debug Stack display, and it might have to do with the fact that ints are handled as QVariant::Int, doubles are handled as QVariant::Double, but floats are handled as QMetaType::Float. And this might be fixed in Qt 5: [quote author="Andre" date="1308739392"]Note that in Qt 5, the distinction between QVariant::Type and QMetaType::Type will most likely go away.[/quote] Thanks again for your help, especially this quickly!