Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • How to set windows system path using Qt api

    6
    0 Votes
    6 Posts
    6k Views
    L
    Well, this is not how environments work. There is one inital system environment (stored in the registry on Windows) which is passed to each created process by the kernel. If a process now spawns another process (which is true for the majority of the processes, userland processes are not spawn by the kernel, but for example by Explorer.exe instead) the environment is passed to the spawned process. This means that a process can always alter its own environment (which gets passed to processes it spawns). If you want to change the environment for other processes you will have to change the system environment and restart all processes (log off and log on on Windows). In fact Windows provides another method by broadcasting WM_SETTINGCHANGE which enables applications aware of that message to re-initialize their environment (which should be true for at least the Windows Explorer, Program Manager and Task Manager).
  • Mac Application version help

    9
    0 Votes
    9 Posts
    7k Views
    K
    Thanks a lot, it worked.
  • Load font from a file into a QFont object

    5
    0 Votes
    5 Posts
    19k Views
    U
    I just found the answer on a "Chinese page":http://www.bsdmap.com/UNIX_html/XWindow.AIX/00000017/00000003.htm (smth.org is the largest Simplified Chinese BBS in the world). The problem is how to find the correct family name for QFont. For Roman characters, the name used for internal referring and external displaying are usually the same, but for this is not the case for Chinese fonts (and at least other CJK fonts, I guess). The author uses xlsfonts to get the internal representation of the fonts. For example, in @ -misc-hanwangcc02-medium-r-normal--0-0-0-0-p-0-big5-0 @ you have "hanwangcc02" as the family name. Use this in the constructor of QFont, and everything will work. But my original purpose was to use a font not in the system. I'm still looking for a way to get the font info without loading it into the system -- doesn't fit the topic for this forum.
  • SQLite and boolean QVariant

    3
    0 Votes
    3 Posts
    5k Views
    P
    Found existing one: "QTBUG-15640":https://bugreports.qt.nokia.com/browse/QTBUG-15640
  • [Solved] How to implement disjoint QTabWidget ?

    5
    0 Votes
    5 Posts
    3k Views
    A
    Ah, so that is not tabs, but MDI. Note that you can make MDI windows also appear as tabs.
  • How to download xml file and parse it using qt.

    15
    0 Votes
    15 Posts
    11k Views
    K
    I wasn't sure if he is using qmake (he just mentioned VS2008). It would of course be the best way to go.
  • Mac startup Help

    2
    0 Votes
    2 Posts
    2k Views
    G
    You cannot do this in Qt code. You have to create a startup item yourself. Have a google search on LaunchAgents and LaunchDaemons for the details.
  • Regarding QDomDocument

    30
    0 Votes
    30 Posts
    17k Views
    G
    Moderator's note: I have merged the two threads "XML File generation using QDomDocument" (was http://developer.qt.nokia.com/forums/viewthread/9483/) from September and "Problem in creating XML file using QDomDocument" (http://developer.qt.nokia.com/forums/viewthread/10663/) from today into this thread. The all are on the same topic. Please stop creating new threads on the same topic. Also, please mind to format your code so that it can be read easily. This includes proper indenting. I doubt that many people take care have a look your code anymore if it's so hard to read. Overall, please read and understand: http://www.catb.org/~esr/faqs/smart-questions.html
  • 0 Votes
    5 Posts
    4k Views
    L
    [quote author="pratik041" date="1318577476"]You are right but many book like "the book of Qt4" i have downloaded free.[/quote] Well, probably those authors didn't want you to read their books for free too? Don't get me wrong - I'm not the moral instance here and everyone should do what he thinks best. But you should think twice before asking and talking about free copies of stuff protected by copyright on public forums, especially the QDN.
  • Floating child widget

    6
    0 Votes
    6 Posts
    4k Views
    P
    Oh, somehow i missed it. Thank you.
  • Linking a QPlugin from another QPlugin corrupts the plugin loading?

    7
    0 Votes
    7 Posts
    4k Views
    T
    I played around with the one above but wasn't able to achieve much... HOWEVER!! I found another very very related post online: "plugin fails to load with uresolved links":http://permalink.gmane.org/gmane.comp.lib.qt.general/32481 This guy was attempting to do exactly the same thing!! Now the question is... why the QT guys didn't at least mention in the QPlugin documentation that you should NEVER have a plugin link against another plugin... I will move to the approach suggested above... A third "common" dynamic library that contains these definitions and against which all the relevant plugins must link... sob :(
  • Double Initialization of QGLWidget on X11

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • GetOpenFileName() crashes the app under Irix 6.5

    4
    0 Votes
    4 Posts
    2k Views
    L
    Thanks, I've created an issue report in bug tracker dashboard. The number is QTBUG-22012.
  • Memory dump on exit

    3
    0 Votes
    3 Posts
    3k Views
    H
    You can also use a valgrind - tool for investigating leaks. You can also try a cppcheck - this tool is for static code analize.
  • [SOLVED] Qt crashing on windows when loading an image file

    3
    0 Votes
    3 Posts
    2k Views
    H
    Yup. It did it. What a dumb mistake! Thank you, much appreciated. :)
  • Selecting a portion of an image to zoom into in a QGraphicsView

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • QList and segmentation fault

    6
    0 Votes
    6 Posts
    8k Views
    G
    It hits me too, from time to time - no need to worry :-)
  • QPushButton to activate widget.show()

    10
    0 Votes
    10 Posts
    6k Views
    G
    connect() takes object pointers (adresses) as arguments. As your widget is stack based, you need operator & to pass an address, so just change widget to &widget in the statement: @ // WRONG QObject::connect(button, SIGNAL(clicked()), widget, SLOT(show()); // right QObject::connect(button, SIGNAL(clicked()), &widget, SLOT(show()); @
  • Compile static lib errors.

    2
    0 Votes
    2 Posts
    3k Views
    P
    That's my build.bat file which I use to build Qt staticaly @ SET PATH=C:\Qt\4.6.1\bin;C:\Qt\4.6.1\include;%PATH% call vsvars32.bat nmake confclean configure.exe -static -no-qt3support -qt-libpng -qt-libjpeg -qt-gif -qt-zlib -no-phonon-backend -platform win32-msvc2005 -debug-and-release nmake @ Now I use them in MS Visual Studio 2005 and it works fine. Just specify Multi-threaded (/MT) option in properties dialog.
  • [Solved] stdin with QIODevice

    5
    0 Votes
    5 Posts
    6k Views
    G
    [quote author="koahnig" date="1318507175"] [quote author="Gerolf" date="1318504064"] This means, unless StandardInputReader::read returns something bigger then 0 the while loop goes on iterating...[/quote] The other way around, or? You mean, when StandardInputReader::read returns something bigger then 0 the while loop goes on iterating...[/quote] right,....