Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.4k Topics 456.4k Posts
  • [SOLVED] focus problem on Ubuntu when using QMessageBoxes

    4
    0 Votes
    4 Posts
    3k Views
    Y
    [quote author="alexisdm" date="1312852866"]Does it do the same thing if you add the main window (this) as parent of the message box ? [/quote] It worked thanks! I am curious to know why this was not necessary on red hat and also on another ubuntu (10.04 LTS 32 bit vmware using qt4.7 instead of qt4.6)
  • 0 Votes
    4 Posts
    4k Views
    EddyE
    No problem. Could you edit your title and add [solved] ?
  • InsertRecord performance in QSqlTableModel.

    5
    0 Votes
    5 Posts
    3k Views
    Z
    Where does the profiler say most of the time is being spent? Try using QSqlQuery directly rather than via the table model.
  • KeyPressEvent()-Function: I want to use Capital-Letters

    3
    0 Votes
    3 Posts
    4k Views
    G
    For the rest you have "QKeyEvent::modifiers() ":http://doc.qt.nokia.com/4.7/qkeyevent.html#modifiers. But the API docs state that these are not reliable.
  • 0 Votes
    15 Posts
    28k Views
    EddyE
    you're welcome. Just another thought : I noticed a 2 pixel wide white border in your image. You could eliminated this and let Qt handle the normal behaviour.
  • Problem with slots

    8
    0 Votes
    8 Posts
    3k Views
    M
    I guess "this":http://developer.qt.nokia.com/forums/viewthread/1951I is wide spread: moc it manually again "moc.exe enroll.h -o moc_enroll.cxx" and add that *.cxx to your project (Add --> Existing Item..). This worked when I had this problem.
  • 0 Votes
    13 Posts
    4k Views
    U
    ok i will check it out ,thanks again
  • QFile read/write

    4
    0 Votes
    4 Posts
    17k Views
    L
    [quote author="Volker" date="1312841948"] As a side note: Don't use a QLabel and show for your error message. Have a look at [[Doc:QMessageBox]], especially at the static convenience methods to show a nice error box. [/quote] Or [[Doc:QErrorMessage]], while we're at it :-)
  • QGraphicView and fixed viewport

    5
    0 Votes
    5 Posts
    3k Views
    V
    Please provide some code showing what you are doing.
  • [Split] How to scale an image proportionally

    2
    0 Votes
    2 Posts
    2k Views
    T
    Take a look at "QImage::scaled()":http://doc.trolltech.com/4.7-snapshot/qimage.html#scaled with Qt::KeepAspectRatio mode
  • Playing a Video file(.wmv) in the entire dialog window

    2
    0 Votes
    2 Posts
    2k Views
    EddyE
    You didn't use a layout in your dialog. By default a widget will be placed at the top right then.
  • 0 Votes
    6 Posts
    4k Views
    G
    That's the way, check the type URL and the check the file type. You could also use a QImage or similar and try loading it :-)
  • Passing Paramater from .cpp file to .qml file

    2
    0 Votes
    2 Posts
    1k Views
    S
    May be "this":http://xizhizhu.blogspot.com/2010/10/hybrid-application-using-qml-and-qt-c.html help.
  • Qmake flags

    5
    0 Votes
    5 Posts
    5k Views
    M
    Thanks now I get a dlerror. Are my includes wrong or how to use the lib without linking? (the lib is GPL so I cannot directly link) Many thanks Michael unix:!macx { INCLUDEPATH += ./ ... QMAKE_LFLAGS += -g -Wl,-rpath,\$$ORIGIN }
  • [solved]resizing vertical header

    15
    0 Votes
    15 Posts
    22k Views
    EddyE
    @Alexis good one!
  • Is there any way to add more Qt::globalColor ?

    3
    0 Votes
    3 Posts
    2k Views
    V
    Not possible without changing Qt source. Anyway, you probably will never need to do that. This might be overkill... ;-) Regards,
  • [SOLVED] display an image in textEdit

    12
    0 Votes
    12 Posts
    11k Views
    K
    thank you alexisdm. I fixed the code in my previous post
  • [SOLVED] Have text in QLineEdit selected on edit start

    3
    0 Votes
    3 Posts
    10k Views
    G
    The text is selected in the focusInEvent, but immediately gets deselected by the following mousePressEvent hat is delivered to the line edit. This code works for me: @ class wvQlineEdit : public QLineEdit { Q_OBJECT public: wvQlineEdit(QWidget *parent); virtual ~wvQlineEdit() {} protected: void focusInEvent(QFocusEvent *e); void mousePressEvent(QMouseEvent *me); bool _selectOnMousePress; }; wvQlineEdit::wvQlineEdit(QWidget *parent) : QLineEdit(parent) { _selectOnMousePress = false; } void wvQlineEdit::focusInEvent(QFocusEvent *e) { QLineEdit::focusInEvent(e); selectAll(); _selectOnMousePress = true; } void wvQlineEdit::mousePressEvent(QMouseEvent *me) { QLineEdit::mousePressEvent(me); if(_selectOnMousePress) { selectAll(); _selectOnMousePress = false; } qDebug() << selectedText(); } @
  • [SOLVED] How to initialize ui in the function?

    11
    0 Votes
    11 Posts
    8k Views
    M
    No problem! There aren't really many reasons to have functions outside your class for this sort of thing. So, keeping them in scope is easy in that sense! Please be sure and add a [Solved] to the beginning of the title of the thread if you feel like the problem is solved.
  • [SOLVED] QTcpServer max connection limit

    15
    0 Votes
    15 Posts
    11k Views
    G
    The original question was: [quote author="kalster" date="1312611841"]what is the maximum QTcpServer connection limit?[/quote] That basically boils down to the OS level and is more or less independent from the frameworks and/or patterns you put on top. The latter may help in speeding up the processing of the requests of course.