Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • QSettings not connecting to .ini file

    2
    0 Votes
    2 Posts
    1k Views
    C
    You have provided a relative file path to the ini file. My bet is that the current working directory of the running program is not what you think it is.
  • Dynamic layout question

    8
    0 Votes
    8 Posts
    3k Views
    A
    tnx for your help so much.
  • How to fix Widget size in QSplitter?

    2
    0 Votes
    2 Posts
    2k Views
    R
    Do you want the parentWidget to remain fixed or the individual widgets(seperated by QSplitter)? the parentWidget can be fixed by setFixedSize() for the childWidgets, you need to use something else as a separator(QSplitter is meant to make resizable widgets within another widget)... There is a Vertical Line Component in Qt Designer(don't know its hard-coded equivalent, though you could use a QFrame for it)
  • QString global variable and coding problem

    4
    0 Votes
    4 Posts
    3k Views
    H
    sidewinder your are right. To print correct global string this is required: @ global.toLatin1() @
  • Qt creator: Widget [SOLVED]

    9
    0 Votes
    9 Posts
    3k Views
    B
    It is true. I am experimenting permformance issue. So where should I add it? ty
  • [SOLVED] Close button

    4
    0 Votes
    4 Posts
    3k Views
    D
    Well there isn't much code to show. At the moment I use this event handler just to detect when the event takes place. @ void MyWindow::closeEvent(QCloseEvent *) { qDebug() << "closed"; } @ That works fine, but the problem is, that this is just an event that takes place when I close that window. It doesn't matte how I achieve this, e.g. by using the window close button or by closing the application. The point is, when I click on the window close button (the one that is integrated in the frame) the window closes anyway. What I'm looking for is to detach this button from its behaviour. E.g. when I click on this button, something else happens (whatever I want) but it does not close the window. Edit: Exactly what Neutron Stein wrote, thx!
  • QTreeWidget drag and drop problem

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Reg: Licencing software

    5
    0 Votes
    5 Posts
    2k Views
    M
    Thank you Ivan and Skylar. You have given me a valuable info.
  • QButtonGroup in QBoxLayout

    12
    0 Votes
    12 Posts
    13k Views
    A
    No, because QButtonGroup is not a widget. However, you can add the radio buttons to the box layout, and still add those radio buttons to a QButtonGroup.
  • QWidget, add TitleBar and custom button

    5
    0 Votes
    5 Posts
    7k Views
    A
    No, there is no Qt API do that. Having said that: You may be able to use platform depended API, or You could hide the default title bar, and implement your own
  • When will Qt 5.0 beta release&#63;

    3
    0 Votes
    3 Posts
    1k Views
    A
    You can build right now yourself, or use any of the available builds out there already. Look at http://releases.qt-project.org/digia and/or http://releases.qt-project.org/qt5.0/beta-snapshots
  • 0 Votes
    4 Posts
    5k Views
    D
    OK, with a fresh brain I have now solved it (just in case anyone else has this problem). The projects were identical for all intents and purposes except for the ui (since I was not accessing the ui and my scroll class was the only thing on the screen I did not see that as a problem). My full project had styling applied in the UI - inc styling on the scroll bar. Remove that and bingo!!! (In my defence the whole point was to have the scroll bars hidden so I did not see the styling).
  • Two Qt Resource Files (.qrc), switch while runtime

    6
    0 Votes
    6 Posts
    5k Views
    ?
    I tried it, but it does not work. I forgot to they, that I want to use it on Windows. I think it is a problem with the path. I need an absolute path, starting with /, so it seems it is Linux based.
  • Parameter passing in signals

    6
    0 Votes
    6 Posts
    4k Views
    F
    OK, so it's basically the same idea :-) only in python one can just dynamically add id/index to the object ..
  • [SOLVED] Clear QTableWidget content

    2
    0 Votes
    2 Posts
    8k Views
    M
    @ void QTableWidget::clear() @ The "documentation":http://qt-project.org/doc/qt-4.8/qtablewidget.html#clear is your friend :)
  • Connect Doubts...

    4
    0 Votes
    4 Posts
    2k Views
    A
    There are several versions of disconnect, which take different sets of arguments. Did you read the docs on all of them?
  • QToolbar question

    3
    0 Votes
    3 Posts
    2k Views
    F
    OK, Thank a lot, I see it in the docs as well now (must have been tired ...)
  • Is that meego will reborn?

    2
    0 Votes
    2 Posts
    1k Views
    L
    See http://qt-project.org/forums/viewthread/18609.
  • Event/signal when any kind of gui activity occurs

    2
    0 Votes
    2 Posts
    2k Views
    D
    You could make a timer which triggers every 5 secs and checks whether the cursor has moved further than, for example, 2 pixels in that time (see QCursor::pos()). If it hasn't moved for n consecutive intervals, lock the application. For the keyboard it's more difficult when your program doesn't have focus. I wouldn't recommend creating keyboard hooks for this, because your program wouldn't be distinguisable from a malicious keylogger. If you just want to react to keyboard events while your application is active, look into event filters. //EDIT: Thought about it. If you're not writing a text editor or word processor, just checking the cursor position and ignoring the keyboard should be fine for your purpose. //EDIT2: If this is an industrial application (i.e. doesn't need to be pretty but robust), assign each user his own background color tone. This way a user will feel foreign when working with a different account and should notice it right away.
  • #if Q_BYTE_ORDER = Q_LITTLE_ENDIAN apparently not working

    4
    0 Votes
    4 Posts
    2k Views
    P
    Thanks mburr! I did some more testing and you pinpointed the problem exactly.