Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • KeyPress Simulation

    2
    0 Votes
    2 Posts
    2k Views
    G
    Hi Revu, in which use case do you want to do that? If you want to use it in a test case, use QTest, otherwise you have to do it on your own or with OS API methods.
  • How to insert a Dialog into the Main window

    6
    0 Votes
    6 Posts
    10k Views
    C
    After a while... I have found the correct solution by myself. You have to use QStakedWidget and add pages to it. On every page you can place all your widgets and switch the appopriate page with setCurrentIndex(). This thread can be marked as solved! Thanks
  • QTreeWidget::clear problem

    4
    0 Votes
    4 Posts
    4k Views
    A
    Why did you redefine rowsAboutToBeRemoved ? You are supposed to call that method, not reimplement it. It is not even virtual!
  • Help requested: creating a keyframed timeline editor

    5
    0 Votes
    5 Posts
    4k Views
    A
    You also can have your delegate respond to clicks directly without opening an editor. Simply reimplement editorEvent in [[doc::QAbstractItemDelegate]] (baseclass for all delegates).
  • Slots are defined on Windows not work on MAC OS

    6
    0 Votes
    6 Posts
    2k Views
    B
    Yes I am using Designer. I can not find the file ui_. *, in the folder with the project it is not. where it can be?
  • 0 Votes
    6 Posts
    2k Views
    T
    Please do not use the libraries found in C:\QtSDK\QtCreator*. That is a custom Qt build for Qt Creator and not what you used to build your code. Please use whichever Qt version you used to build your code with instead.
  • How to set data (Qt::UserRole) into QSqlQueryModel column?

    5
    0 Votes
    5 Posts
    9k Views
    U
    Hi thanks for replay , in the end all i want to do is to decorate item in the QSqlQueryModel Tableview so i now using allso ItemDelegate from QStyledItemDelegate that will overwrite the Text in the Item. i hope this will work . from what i do now it is not removing the old text dont know why .. this is the paint method in the item delegate: @if (index.isValid()) { int j = index.column(); if(j==4) { QString headerText_UserRole = index.data(Qt::UserRole).toString() ; QString headerText_DisplayRole = index.data(Qt::DisplayRole).toString() ; painter->save(); QFont font = QApplication::font(); font.setBold(true); painter->setFont(font); QRect headerRect = option.rect; painter->drawText(headerRect,""); painter->restore(); } } QStyledItemDelegate::paint(painter, option, index);@
  • [SOLVED] QUdpSocket and SO_BROADCAST

    8
    0 Votes
    8 Posts
    9k Views
    A
    Sorry, Yes it is for sending broadcast. For receiving you get with all the traffic that arrives on the port you are bound to. Adrian
  • Template class not supported by Q_OBJECT

    9
    0 Votes
    9 Posts
    27k Views
    A
    hmm... then calling getter function in response to the signal seems pretty good...
  • Adding a tooltip in QPlainTextEdit

    4
    0 Votes
    4 Posts
    4k Views
    F
    Hm, i see. So that's the only way, thanks. :)
  • XPath query of DOM.

    7
    0 Votes
    7 Posts
    9k Views
    G
    Don't wake the dead, please. The last post here was from August 2010, almost one and a half year ago...
  • QApplication handling unexpected X server shutdown?

    4
    0 Votes
    4 Posts
    3k Views
    T
    rcari: I registered for every possible signal there is, and none of them are caught when the server shuts down. peppe: I mean if the user was to say, logout of Windows that's running an X server. It's not a crash on the X server's part.
  • [SOLVED] Qt + LLVM's JIT on Windows

    3
    0 Votes
    3 Posts
    3k Views
    A
    Going back to an old thread of mine, but just to say that I have since got LLVM to work fine in my Qt application, and this on Windows, Linux and Mac OS X. No doubt, LLVM is very nice!
  • When I must use an "qApp" pointer and when "this" pointer?

    4
    0 Votes
    4 Posts
    14k Views
    L
    qApp is a globally accessible pointer to the QApplication object, this is a pointer to the object for which the member function is called. So in your case qApp points to the QApplcation object which was created in <code>main()</code>, this points to the <code>Notepad</code> object whose member function - or constructor in your case - is called. So if you want to connect to a slot of the QApplication object use qApp, if you want to connect to a slot of the "current" object use this, or if you want to connect to any other object just use any other pointer that points to a valid QObject subclass.
  • Phonon - issue playing video using iodevice object

    12
    0 Votes
    12 Posts
    4k Views
    J
    Ok, one more thing I hate to bring this up Yes -QFile is a QIODevice, but the QIODEvice is not a QFile. Correct and if mediasource was expecting QFile I could not pass a QIODevice. QIODevice is an abstract class as such the only way for me to pass a QIODevice is with a class that extends it - QFile or my own custom device.
  • Data not selected when using a custom delegate in a QTableView

    15
    0 Votes
    15 Posts
    7k Views
    G
    [quote author="shiru" date="1328187678"]This is the second time in this thread that I feel injuried. @Gerolf If you don't want to help, don't post and please don't be sarcastic or at least read all the thread before posting your answer. You "autoproclamed hackers" are all the same, you think you're superior to everyone, you act as you never been beginners. [/quote] Hi shiru, I'm sorry if you fealt like I want to blaim you, that was not my intention. I just tried to give you a hint, where to look. As you perhaps know, nearly all people here are doing this in their free time. So sometimes, you see the problem, but have no time for a long answer. What should I do? give a short hint or not answer? The technical thing is already described by Volker, so I will not go into that.
  • QLineEdit buggy display on MacOS X

    11
    0 Votes
    11 Posts
    3k Views
    O
    Bug report submitted: "see here":https://bugreports.qt-project.org/browse/QTBUG-24051. Thanks for your help.
  • Qt Solutions Archive

    3
    0 Votes
    3 Posts
    4k Views
    rincewindR
    The project builds a library and some examples. It seems to be giving the error when building the example. The last output line says: @mingw32-make.exe[1]: Leaving directory `C:/Projects/libs/qt-solutions/qtwinmigrate-build-desktop-Qt_4_7_4_for_Desktop_-_MinGW_4_4__Qt_SDK__Debug/examples' @ What confuses me is that I get this error in the "Compile Output", but in the "Issues" window when I click on the error: @C:\iwmake\build_mingw_opensource\src\winmain\qtmain_win.cpp:131: error: undefined reference to `qMain(int, char**)' @ The second line of the output changes to: @File not found: C:\iwmake\build_mingw_opensource\src\winmain\qtmain_win.cpp@ I don't have such a directory, and it seems to be some hardcoded path somewhere in the make files. So, it seems this is a reference to the Qt source which I installed with the package manager, but I don't know (yet) how to change the path to Qt source on my machine.
  • [SOLVED]QTimer problem

    4
    0 Votes
    4 Posts
    2k Views
    T
    Oh I found som redundant code too here ClearVectors;
  • How to apply QIntValidator for QTextEdit

    6
    0 Votes
    6 Posts
    5k Views
    K
    I guess your problem is that QTextedit does not have a setValidator method. Why that is the case? Volker has given the answer. Multi-line may make it time consuming.