Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 457.9k Posts
  • 0 Votes
    3 Posts
    3k Views
    I
    Doh! I've totally misinterpreted Qt docs. Volker, thank your for opening my eyes
  • 0 Votes
    5 Posts
    4k Views
    L
    Yes, I found it, and it works. Thank you very much!! I think I can have a good sleep tonight:-)
  • Splashscreen problem

    3
    0 Votes
    3 Posts
    2k Views
    G
    Put the code in two @-markers or use the code button in the editor, please. The code is quite unreadable this way.
  • QTreeWidget: how to limit the number of displayed rows?

    7
    0 Votes
    7 Posts
    9k Views
    G
    The proxy filter model solutions seems not to be what the user wants. The tree widget should have a height to show 4 rows simultaneously and provide a scroll bar if there are more than 4 rows to display. Another solution might be to use a "QSplitter":http://doc.qt.nokia.com/4.7/qsplitter.html, let the user choose the ratio between the two widgets and save the splitter's state when closing the window or quitting the application. See "QSplitter::saveState()":http://doc.qt.nokia.com/4.7/qsplitter.html#saveState "QSplitter::restoreState()":http://doc.qt.nokia.com/4.7/qsplitter.html#restoreState "QSettings":http://doc.qt.nokia.com/4.7/qsettings.html for details.
  • Moc Error: Too many input files specified. Integration Problem?

    3
    0 Votes
    3 Posts
    8k Views
    D
    Please use @ tags, not code ones.
  • Background image for an application

    4
    0 Votes
    4 Posts
    3k Views
    B
    Something like this: @ About::About(QWidget *parent) : QDialog(parent), _ui(new Ui::About) { _ui->setupUi(this); QPalette pal = palette(); pal.setBrush(backgroundRole(), QBrush(QPixmap("path_to_image.png"))); setPalette(pal); ... } @
  • [Solved] Undefined reference problem

    9
    0 Votes
    9 Posts
    22k Views
    I
    add to pro fie: @DEFINES += CORE_LIBRARY@
  • Rearranging/shifting widgets in grid layout

    5
    0 Votes
    5 Posts
    19k Views
    O
    Thanks for your input guys. After weighing my options I decided to go for dynamic recreation, it will occur rarely enough (startup and settings change, although it's possible someone will change settings multiple times during use it's still a relatively uncommon event) to not have a performance hit. I like the idea of subclassing QGrid but it's a fairly complex task and bit of an overkill in this specific case I think. Also, HBox/VBox idea is great but I would like to keep the ordering of cells in this case. As I said, I'm still learning and I was unaware of this specific problem when I was starting so rearranging it out of a grid would mean a major UI overhaul, but I'll be careful with grids in the future. At least I'll learn how to rely on UI designer less now so it's all good :)
  • How does QWidget support stylesheet ?

    3
    0 Votes
    3 Posts
    4k Views
    D
    The stylesheet support is done by a widget style, internally. I.e. a QStyle subclass. So if you're looking for the code, it will be in src/gui/styles/qstylesheetstyle.cpp
  • Issue with QComboBox with Windows Vista

    4
    0 Votes
    4 Posts
    3k Views
    B
    [quote author="castormalin" date="1290594821"]but I did'nt found a "wakeupGUIThread()"-like method.[/quote] I am also interesting how to port application that uses wakeupGUIThread() call to Qt4. No hints in the official documentation.
  • [SOLVED]Cannot execute my slot when menu item was clicked.

    4
    0 Votes
    4 Posts
    4k Views
    C
    Oh. The problem was that added QMdiSubWindow didn't shown automaticaly, then, when i execute addNew from window constructor it's executes and shown correctly, but, in other cases i should execute qMdiSubWindow->show(); manually. Now AddNew slot looks like this: @void MainWindow::addNew() { ui->mdiArea->addSubWindow(new QuestionList); ... ui->mdiArea->subWindowList().last()->show(); }@ and all works fine. Never mind. Thank you.
  • Using lib debug version

    4
    0 Votes
    4 Posts
    4k Views
    Q
    Thanks a lot for your quick answer.
  • Ubuntu 10.10 update loses QtMultimedia

    3
    0 Votes
    3 Posts
    4k Views
    A
    Yes that was my understanding as well - however illogical that decision was by Nokia (so far my protests have gone unheard). But, it does not tell me where the includes are for QtMultimedia. There is no QtMobility folder nor QtMultimedia folder under Qt4 nor even under KDE a mention of mobility or QtMultimedia. So just where do I find the library includes on Ubuntu 10.10 and why is this not very well documented in the release notes? In fact why does it have to be deployed differently on Ubuntu from canonical than the install package from Nokia?
  • Qt3 to Qt4 porting. Layout names not saved

    7
    0 Votes
    7 Posts
    4k Views
    F
    OK then.
  • How good is the HTML and CSS support in QTextBrowser

    3
    0 Votes
    3 Posts
    8k Views
    B
    [quote author="Volker" date="1290446329"]I don't see why this would be an overkill - it's just adding "webkit" to the QT variable in your .pro file and some 5 lines of additional code[/quote] No overkill except application size. Large library is added to the dependencies, it is also memory-consuming. But for the desktop it shouldn't be a problem
  • Reading double values with sscanf in QT

    6
    0 Votes
    6 Posts
    6k Views
    B
    Hi, perfect. this is exactly the method I searched for. with this everything works fine. Thank you very much.
  • QVariant::save/load: unable to save type X

    19
    0 Votes
    19 Posts
    28k Views
    G
    You can find some nice infos on "cplusplus.com":http://www.cplusplus.com/doc/tutorial/typecasting/, also the example is taken from somewhere of the Qt sources, to be honest :-)
  • Using delegate

    6
    0 Votes
    6 Posts
    4k Views
    A
    thanks for help :) I understand now. we can declare our own signals. ok.
  • Tab order in Dock Window

    3
    0 Votes
    3 Posts
    4k Views
    B
    Thank you for reply. [quote author="tbscope" date="1290405320"]There's no such thing as a dock window in Qt. There's a dock widget though that sometimes acts as a window (when detached).[/quote] You are right, I mean QDockWidget (in Qt3 it was called QDockWindow). [quote author="tbscope" date="1290405320"]You can try not setting a parent (but I don't know the results of that).[/quote] It will be re-parented when added to QMainWindow dock area. [quote author="tbscope" date="1290405320"]Or setting the Qt::Window flag.[/quote] The problem exists if the widget is docked.
  • No qmake in /bin /sbin /usr/bin /usr/sbin

    15
    0 Votes
    15 Posts
    18k Views
    G
    No problem, you're welcome. I once struggled over this, too.