Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • [Solved] Full MDI Example

    15
    0 Votes
    15 Posts
    17k Views
    E
    Ok, understood now, we won, was a big help
  • [Solved] 64bit osx

    3
    0 Votes
    3 Posts
    2k Views
    M
    Ah, I fixed it. I simply had to change what Qt version I was using, I had it set to Qt in PATH from a previous Qt version and needed to change to to use the newly installed one. Thanks. -=ben
  • QMainwindow Qt::Applicationmodal

    2
    0 Votes
    2 Posts
    3k Views
    D
    Ok, I've build a new QDialog in qt designer and copy/paste my old QMainwindow. Done !
  • When a Qlabel is mouse clicked is a signal generated?

    4
    0 Votes
    4 Posts
    6k Views
    T
    "Your text to link here...":http://popdevelop.com/2010/05/an-example-on-how-to-make-qlabel-clickable/
  • Header file reference problem???

    18
    0 Votes
    18 Posts
    9k Views
    T
    ok, thank you so much for help.
  • Environment variables

    4
    0 Votes
    4 Posts
    4k Views
    T
    Thanks so much guys, just what i was searching for. In fact i already had this thing put into my code but it didn't work out as it closed on start. This is caused by the fact that the memory for an app that you call via QProcess is allocated from the program stack. When the variable goes out of scope, the memory which was taken on the stack is freed. Therefore you need to alloate it in the heap. Here's how i did it. @ void myQtApp::function() { QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); env.insert("MYAPP_VAR1","value1"); QProcess *proc; // pointer definition proc = new QProcess( this ); // memory allocation from heap, created with parent proc->setProcessEnvironment(env); // set environment variables proc->start("regedit.exe"); // start program } @ Be are these env vars will not be available once the process is finished/closed.
  • Reset Progress Bar

    2
    0 Votes
    2 Posts
    3k Views
    G
    a bit more code could help. In general, setValue is the right solution.
  • [Solved] QFileDialog::getOpenFileName breaks message boxes etc.

    27
    0 Votes
    27 Posts
    18k Views
    L
    No it's not and that on purpose so that if there is a brief period with no active widget, the event is remove again: @ void QApplicationPrivate::emitLastWindowClosed() { if (qApp && qApp->d_func()->in_exec) { if (QApplicationPrivate::quitOnLastWindowClosed) { // get ready to quit, this event might be removed if the // event loop is re-entered, however QApplication::postEvent(qApp, new QEvent(QEvent::Quit)); } emit qApp->lastWindowClosed(); } } @ EDIT: To explain (I'm sure @Gerolf, you know what this means, but now everybody reading this thread will), the close event on QApplication is one executed directly (which would be sendEvent()), but postponed until the eventLoop is run next, in order to give QWidget a chance to remove it again.
  • QColor name to rgb name

    3
    0 Votes
    3 Posts
    6k Views
    S
    Try this: @ QColor c; // QString name = QString("rgb(%1,%2,%3)").arg(c.red()).arg(c.green()).arg(c.blue()); @ *EDIT:*As Gerolf said... >:(
  • [SOLVED] Problem with a plugin which depends on another plugin

    8
    0 Votes
    8 Posts
    4k Views
    A
    Solved, see http://www.qtcentre.org/threads/42683-Problem-with-a-plugin-which-depends-on-another-plugin?p=195304#post195304.
  • Capture http request before sending with QtWebkit framework

    2
    0 Votes
    2 Posts
    3k Views
    L
    You can subclass QNetworkAccessManager and reimplement createRequest to do that (Just do your logging and then fallback to the parent function).
  • Adjusting size between 2 widgets within a gridlayout (beginner question)

    6
    0 Votes
    6 Posts
    7k Views
    O
    Thanks for your help guys, QSplitter did the trick
  • 0 Votes
    8 Posts
    5k Views
    J
    Thanks Volker. It works! I find it weird that the autoExclusive property mimic the behavior of buttons in a group, except when there is only one radio button.
  • Storing libraries in a particular folder

    5
    0 Votes
    5 Posts
    2k Views
    Z
    In that case you need to tell the system where to find your dll's. That is you need to somehow alter the %PATH% environment variable. You could do this in a simple wrapper script that launches the real application or a compiled stub application. You may even be able to do it in a windows shortcut (I can't recall off the top of my head).
  • Fade out sound

    18
    0 Votes
    18 Posts
    9k Views
    S
    Finally I succeeded achieving this in Phonon on Windows 7. I just adjusted the volume level to create the fade out.
  • [SOLVED] Qicon disabled full color

    7
    0 Votes
    7 Posts
    10k Views
    E
    Yep! That worked well! Thanks!
  • [SOLVED]QLibrary - load and using DLL

    9
    0 Votes
    9 Posts
    8k Views
    P
    Yes, "extern 'C'" working. :) :D Thank you very much.
  • [Solved] setToolTip in QAction menu

    17
    0 Votes
    17 Posts
    16k Views
    A
    The current code handles QEvent::ToolTip in QMenuBar::event. For the menu items, you need to do the same QMenu::event(). Just a side note: As you can see, Qt does not support this use case by default. Do a quick research in your system, how many applications show tooltips like those you want? IMHO menu and menu items should have self-explaining names. If the menu names are good enough, the tooltips are redundant. But that's just my opinion...
  • Problem with transform of pointer

    5
    0 Votes
    5 Posts
    3k Views
    R
    Many thanks for your help, I did not consider object CentralWidget
  • [SOLVED]Write QMAKE replace function

    12
    0 Votes
    12 Posts
    6k Views
    P
    Used in Library project: @include(../../../Project.pri) QT += xml xmlpatterns TARGET = $$setLibraryTarget(Configuration) @ Defined in project include file ( .pri ) @defineReplace(setLibraryTarget){ NAME = $$1 return($$quote(${SYDNEYSTUDIO_PROJECT_NAME}.$$NAME)) }@ Well, when I removed Makefile and wrote is on multi-lines, it works...thanks for help. So solution is, do not write QMAKE function as inline :D :D But, there is another problem with my QMAKE (new thread?)