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] Incorrect move of widget in graphicsview

    5
    0 Votes
    5 Posts
    3k Views
    S
    Point taken. I think I can avoid it, so I will. Thanks to you both for the advice.
  • Qt doesn't simulator work?

    3
    0 Votes
    3 Posts
    1k Views
    M
    In my project was some kind of error, so I start again. If I do command like this why it doesn't name letter c. @void Testi::on_pushButton_clicked() { int a = 100-ui->spinBox->value(); int b = 12-ui->spinBox_2->value(); if (b==1) { int c = 31-ui->spinBox_3->value(); } else if (b==2) { int c = 28-ui->spinBox_3->value(); } else if (b==4) { int c = 30-ui->spinBox_3->value(); } int d = ui->spinBox_4->value(); int e = ui->spinBox_5->value(); int f = ui->spinBox_6->value(); ui->listWidget->addItem(QString::number(((10000a+10000d+100b+100e+c+f)-10100)+(a+d)/4));@ Is there something wrong in my project?
  • Various Question about QSqlDatabase

    6
    0 Votes
    6 Posts
    3k Views
    A
    Yes. But note that you should make sure that there are no queries using this database left in scope. See the documentation of QSqlDatabase::removeDatabase().
  • [Solved] QTableView in QGroupBox: Mouse ignored for the table view?

    3
    0 Votes
    3 Posts
    3k Views
    W
    //EDIT: "I thought that I was just missing something trivial..." Yes, very trivial... The hierarchy was incorrect. QTableView was not a child of QGroupBox. I don't know how I messed this up. Problem solved.
  • [Moved] Calculator

    10
    0 Votes
    10 Posts
    3k Views
    M
    Yeah! Now it works! Thanx a lot. I had the last () too much and my symbian^3 qt simulator didn't work.
  • Emitting initial signals/Application setup

    2
    0 Votes
    2 Posts
    1k Views
    A
    My approach for this kind of thing usually is, to have a single slot updateGui() or something like that. All signals that can result in an update of the Gui connect to that slot. In that slot, I put all the logic of updating the different Gui elements according to the relevant states (checked checkboxes, radiobuttons, selected items from combo boxes, etc. etc.). At the end of my constructor method, I simply call this method once to initialize the Gui state.
  • Corrupted heap space using QtXmld4.dll (VS 2010)

    13
    0 Votes
    13 Posts
    7k Views
    G
    I rhink, you have to link Qt complete statically, or use /MD. The Qt libraries are not memory neutral (which means, memory allocate din one library may be freed in another one).
  • [Solved] Error handling on async tree model loading

    2
    0 Votes
    2 Posts
    2k Views
    M
    Solution was to not remove "loading..." child and just collapse the item.
  • QUdpSocket::readyRead() doesn't emit after thread event loop restart

    3
    0 Votes
    3 Posts
    6k Views
    U
    Here are the pseudocode for putting socket in a listening mode: @B::B (int port, QMutex * mutex) : mutex_ (mutex) { socket.bind(port); connect (&socket, SIGNAL(readyRead()), this, SIGNAL(Process())); }@ UDP packets start arriving only after I start event loop. So: @void A::Run () { thread->start(); // UDP packets start arriving, for this piece of code readyRead() emits as usual Sleep (SOME_TIME); // UDP packets stop arriving Sleep (WAIT_PACKETS_TIME); thread->quit(); Sleep (OTHER_TIME); thread->start(); // UDP packets start arriving again, but readyRead() not emitted }@ And how can I check if the readyRead() was emitted without starting event loop?
  • 0 Votes
    13 Posts
    15k Views
    G
    Glad to hear that it was that easy :-)
  • [SOLVED]Simple Widget ToolTips Not Working

    6
    0 Votes
    6 Posts
    5k Views
    P
    Right on target again, Volker :) Issue solved, thanks.
  • Annoying Background-Position problem

    2
    0 Votes
    2 Posts
    2k Views
    R
    The image by the way is tiny in size, and encompasses the magnifying glass fully.
  • Round windows with setMask - but what about resize?

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • [Solved] QTableWidgetItem::setFont() - how to do it properly

    9
    0 Votes
    9 Posts
    16k Views
    D
    Yay. Works... and I've spent like an hour to create all this 2D QFont pointers array and all of it's surrounding (methods for inserting and removing rows and cloumns) as a workaround. Geez... Thank you very much Andre! Let's cut out the useless code of my project then ;-).
  • Bug in QTextEdit ?

    5
    0 Votes
    5 Posts
    3k Views
    L
    [quote author="Volker" date="1299249655"]Read the API docs: bq. QTextEdit::QTextEdit ( const QString & text, QWidget * parent = 0 ) Constructs a QTextEdit with parent parent. The text edit will display the text text. The text is interpreted as html.[/quote] @ The text is interpreted as html. @ I didn't read this. That's why... Thanks!
  • Layout alignment across widgets

    8
    0 Votes
    8 Posts
    7k Views
    A
    To show off the result of the corrected form using the ColumnResizer class from the blogposting Tobias pointed to: http://imagebin.org/141128 Everything nicely aligned, even between the different pages from the widget stack that appear when you change the database type from the combo box.
  • QWidget signals emitted when menu selected - how do I stop this?

    6
    0 Votes
    6 Posts
    3k Views
    E
    Yes indeed, that fixed it. Thank you for your input. Stephen.
  • 0 Votes
    6 Posts
    6k Views
    Q
    The accept-encoding trick fixed it. After the QNetworkRequest is created I set the accept-encoding header to gzip and it successfully downloads and saves the compressed data. Many thanks for the suggestion. @ QNetworkRequest request(url); request.setRawHeader("Accept-Encoding", "gzip"); @
  • Disabled QPushButton Not "Grayed Out"

    4
    0 Votes
    4 Posts
    24k Views
    P
    Thanks for following up. This is an area in Qt where the "convention over configuration" paradigm is appropriate. You say you expected this to work automatically. Might it not have worked because the parent widget has a style sheet defined? It does in my case, although none of the QButtton properties or the default and active states are set in it.
  • Raster Scrolling

    3
    0 Votes
    3 Posts
    2k Views
    M
    A waterfall plot