Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • QThread Background?

    9
    0 Votes
    9 Posts
    6k Views
    S
    bq. @// spawn new upload thread upload upld(m_imagedata); upld.start();@ The object - upld will be destroyed while you going out of "if(event->button() == Qt::LeftButton)". You should create upld on the heap, not on the stack: @upload *upld = new upload(m_imagedata); upld->start();@
  • Disable widget background fills before paint

    3
    0 Votes
    3 Posts
    5k Views
    N
    You are right - I tested under Windows XP and there is no flickering. Thanks.
  • Truncate a file under mac with Qt

    10
    0 Votes
    10 Posts
    5k Views
    G
    The code is basically ok. It seems that it is broken otherwise. The snippet lacks complete information, though. We're not able to analyze it otherwise. Of what type is myfile? Where is it defined?
  • Why mouse cursor dissapears in mouseMoveEvent after update()?

    2
    0 Votes
    2 Posts
    2k Views
    B
    can anyone explain me why custom painting with XPutImage in Qt3 works fine and in Qt4 I can`t see cursor?
  • Emptying a sql table model (or a table view)

    19
    0 Votes
    19 Posts
    11k Views
    F
    I found something interesting, I hope someone can explain me what am I doing wrong. Now, in a table I've a slot connected to currentRowChanged signal, so that when a row on the master table is selected, the slave table is updated (i.e., filtered). The slot attached to the signal is like the following: @if( modelIndex.isValid() ){ // filter } } else{ doSlaveClean(); } @ and the doSlaveClean method removes the model from the view and calls clear: @void BasePerspective::doSlaveClean() { tableView->setModel( NULL ); tableModel->tableName(); }@ Now, this works fine if the doSlaveClean is called only once per slot execution. I mean, when a row is de-selected in the master table, the signal is emitted, the slot calls doSlaveClean and the table is cleaned without loosing the table name. If, within the same slot, I call another time doSlaveClean, the table model appears not to be bound to a table. Is this a kind of concurrency problem of the signal/slot mechanism? Now, why should I call twice the doSlaveClean? Because I forget that de-selecting a row emits currentRowChanged ... Anyone can give me an hint about this?
  • Qt Project + Gerrit using http protocol

    4
    0 Votes
    4 Posts
    3k Views
    F
    [quote author="SteveKing" date="1321264326"]Thanks for that. I'm going to try and contribute to the Qt Creator project... Is the setup script you used available in the qt 5 repo,[/quote] Yes. [quote]and would it be any use for Qt Creator? [/quote] Don't know.
  • [SOLVED] Can't link static library to executable - missing declarations?

    8
    0 Votes
    8 Posts
    4k Views
    L
    Check if you are missing a CONFIG += console in your .pro and if the subsystem type is Console (/SUBSYSTEM:CONSOLE) if you are using MSVS.
  • QWidget and it's children

    5
    0 Votes
    5 Posts
    8k Views
    T
    If you want to examine the QObject tree(s) of an application you could just use this: https://gitorious.org/basyskom-inspector It does have some bugs with newer Qt versions and could use an update, but I still find the tool very helpful.
  • Run time error in calling one window from other

    5
    0 Votes
    5 Posts
    3k Views
    A
    Thanks all....i got it..:)
  • "QTimer can only be used with threads started with QThread" warning

    10
    0 Votes
    10 Posts
    25k Views
    S
    @vidar: Looks like you are always ready with some good suggestion for me :-). Thank you very much for the volatile variable suggestion, I will certainly keep that in mind. And thanks again :-).
  • Bug with QGraphicsDropShadowEffect when resizing

    2
    0 Votes
    2 Posts
    2k Views
    R
    My debug Output: bq. Geometry Header: QRectF(0,0 1022x150) Geometry Footer: QRectF(0,741 1022x25) Window will be maximized ! Geometry Header: QRectF(0,0 1918x150) <-- here is the first gap ... now i'll "change the active window" and come back --> Geometry Header: QRectF(0,0 1918x150) Geometry Footer: QRectF(0,991 1918x25) // <-- Now the width is correct ... Geometry Header: QRectF(0,0 1918x150) // <--- Window-Changed Geometry Footer: QRectF(0,991 1918x25) // <--- Window-Changed Window will not be maximized! Geometry Header: QRectF(0,0 1022x150) <-- here is the gap again - the footer is to wide ... --> Geometry Header: QRectF(0,0 1022x150) // <-- after "active-window change repaint" Geometry Footer: QRectF(0,741 1022x25) // now it fits ... Someone any ideas?
  • QImage::save(filename) bug on windows XP platfom

    7
    0 Votes
    7 Posts
    4k Views
    J
    ok, I create this issue https://bugreports.qt.nokia.com/browse/QTBUG-22699 regards
  • [SOLVED] My Qt class and QTableWidget

    20
    0 Votes
    20 Posts
    8k Views
    A
    So, could you please post your solution? It could help others with similar issues. BTW: topics are closed by moderators, not by users ;-) But you are very much invited to mark your topic as [Solved] by clicking the small edit link next to the first posting in the topic. That allows you to edit the title of the topic.
  • Remove widgets from QVBoxLayout [SOLVED]

    4
    0 Votes
    4 Posts
    13k Views
    A
    It indeed works. Thanks a lot !
  • Signals with QAxServer in .NET

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • [SOLVED] Debug ignores breakpoints

    4
    0 Votes
    4 Posts
    3k Views
    C
    Heheh ;) Ok, will do.
  • [SOLVED] listwidget. remove an item not by index but by the name

    3
    0 Votes
    3 Posts
    2k Views
    K
    thank you Gerolf. findItems worked.
  • Problem reading an Xml file with QXmlStreamReader

    29
    0 Votes
    29 Posts
    17k Views
    G
    [quote author="annatz" date="1321123713"]my problem wasn't how to store my data at a data store. my application will show on the screen some checkboxes with my data. how can i dynamically create those checkboxes? i did it like @checkbox1 = new QCheckBox("Geniki Aimatos", this); checkbox2 = new QCheckBox("UREA", this); checkbox3 = new QCheckBox("CREA", this); checkbox4 = new QCheckBox("LDH", this); checkbox5 = new QCheckBox("TBIL", this);@ but i dont know how to create "x" checkboxes and add them a label like "Geniki Aimatos".[/quote] Loop over the data that you have extracted from the XML data. You should have put that into some decent container (QList, QMap...) beforehand. To ease your life, you could go with a [[Doc::QStandardItemModel]] or use a [[Doc:QTreeWidget]]. That saves you the task of writing your own AQIM based item model. The latter would be - don't take it personal - a too complicated task for you.
  • OpenUrl from a QGraphicsView [Solved]

    4
    0 Votes
    4 Posts
    3k Views
    J
    Thanks, I switched to using a button and worked fine. Thanks.
  • Getting data from a lot of QMaps into one QMap.

    6
    0 Votes
    6 Posts
    7k Views
    A
    Why don't you try your debugger, and see where your application crashes exactly?