Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • [Solved] List files like QFileDialog

    4
    0 Votes
    4 Posts
    3k Views
    H
    Vass thank you, I have no idea how I slipped over that. That solved everything :) Thanks Gerolf for confirming my thoughts, and I've checked QFileDialog sources too, it works and looks perfect now.
  • [solved] Dynamic Layout Management?

    2
    0 Votes
    2 Posts
    3k Views
    S
    I just modified the "flowlayout example":http://doc.qt.nokia.com/4.7/layouts-flowlayout.html the way i needed it...problem (kind of) solved :)
  • Setting up OpenGL SuperBible 4th Edition

    3
    0 Votes
    3 Posts
    3k Views
    P
    I used the MSVC 2008 Compiler version of qmake. Qt creator 2.2.1 . @LNK1104: cannot open file 'LIBC.lib'@
  • Know when the mouse is hovering over SpinBox arrow buttons?

    3
    0 Votes
    3 Posts
    3k Views
    A
    I think QStyle should be able to tell you the rect for the buttons, actually. You might be in trouble if RTL layouts in your current approach.
  • Scalable buttons

    5
    0 Votes
    5 Posts
    3k Views
    A
    Make the buttons exclusive by putting them in a QButtonGroup.
  • Clicking the dock icon to show the app on Mac

    2
    0 Votes
    2 Posts
    5k Views
    V
    I know it is an old thread but here is a workaround that seems to be OK: @ void MainWindow::closeEvent(QCloseEvent *event) { #ifdef MACOSX_CORE if (event->spontaneous()) { QStringList args; args << "-e"; args << "tell application "System Events""; args << "-e"; args << "set visible of process ""+QFileInfo(QApplication::applicationFilePath()).baseName()+"" to false"; args << "-e"; args << "end tell"; QProcess::execute("osascript", args); event->ignore(); return; } #endif //Do quit stuff } @ I would have guessed spontaneous() should work the other way around...
  • Rubberband zooming

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • [SOLVED] need help to subclass tabwidget's tabBar

    11
    0 Votes
    11 Posts
    8k Views
    K
    i understand the implementation (definition) now. thank you :)
  • [SOLVED] QLocale and currency data

    3
    0 Votes
    3 Posts
    4k Views
    C
    Seems like I'll have to wait, thanks!
  • QTCreator 2.3 Locals and Watches not populating for Qt classes.

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • 0 Votes
    5 Posts
    2k Views
    L
    Ok thanks.. I will stay with tr() :)
  • Using a non default audio device in OS Windows

    2
    0 Votes
    2 Posts
    4k Views
    ?
    The only person who can help you is yourself. ;) Finally the problem has been solved. The cause of such behavior (the objects of QAudioInput and QAudioOutput classes work only with default devices) is that I use Russian localization of MS Windows 7. So if you use or are going to use Russian (and I guess another not English version) of MS Windows 7 you should read the rest of this post. The point is that QAudioDeviceInfo::availableDevices method returns list of QAudioDeviceInfo objects. And every object of that list describes its own audio device from all available in the system devices. By the by, there is one virtual device which relates with default system device and the name of that virtual device is always “Default”. So the whole point is all another devices in Russian localization of Windows has Russian names (like «Динамики …» or «Микрофон …») and that’s why Qt can’t recognize them. For example the QAudioDeviceInfo::devicename returns something like “D2fq8&$f32” and QAudioDeviceInfo::supportedchannels (supportedcodec, etc.) returns null arrays. So you can’t work with those devices. I don’t know who mess it up - Qt methods or WinAPI functions (which are wrapped into Qt methods how I guess) but we have what we have. My opinion is that this problem occurs because of such thing: Windows contains the names of devices in Unicode (each char takes two bytes), but WinAPI function which is response to give you the name of device returns this name in ASCII or something (one byte per char). Or maybe Qt holds than device names in ASCII. Anyhow the cause of the issue hides in the circumstance of not correct device name encoding. It’s just my guess. If anybody can correct me, please, feel free to do that. ;)
  • [Solved] How to change resolution of an image with Qt?

    4
    0 Votes
    4 Posts
    6k Views
    L
    I would prefer SmoothTransformation for better quality. Thanks again! :)
  • Handling of different layer rect items dimensions

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • QHttp host and file

    3
    0 Votes
    3 Posts
    2k Views
    A
    thank u very much :D:D
  • TabWidget index

    3
    0 Votes
    3 Posts
    2k Views
    B
    Thanks for your answers .... it works! thank you very much
  • How to generate a fake mouse events?

    4
    0 Votes
    4 Posts
    4k Views
    G
    But QtTest is to be used for test automation, not for productive code. IMHO you should not deploy it. From my POV, you should use platform specific code to do it or check, how QtTest does it and do it in the same way.
  • PostgreSql and problem with lastInsertId()

    3
    0 Votes
    3 Posts
    4k Views
    H
    Thanks for reply. Tomorrow I will test Qt 4.7. lastInsertId() returns a OIDS number from Pg(I know from Qt doc), but only in QSqlQuery(I tested this a few minuts ago), but with QSqlTableModel return always 0. I known a RETURNING but I want to stay with QSqlTableModel. Maybe I will change a little driver to Pg to implement a insert with returning. I need think about it what would be better.
  • [Solved] Problem when disconnecting Signals!

    3
    0 Votes
    3 Posts
    4k Views
    L
    That did the work, thanks! :)
  • [Solved]Very strong error in QSplitter

    6
    0 Votes
    6 Posts
    4k Views
    R
    If i do it i get second result agter compile, thats why i get first result after compile And i find my how i can do it: @ splitter->setStyleSheet("QSplitter::handle{image: url(:/images/Resources/Images/slpitter.png);}" "QSplitter { width: 5px; }"); //splitter->setFixedWidth(3);@ the problem turned so easy :) Many thanks for your help!!