Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Toast messages as in Android

    2
    0 Votes
    2 Posts
    3k Views
    J
    You can create a custom widget with desired text/progress bar etc, and add a thread to process, or process without a thread ( OS will treat program as not responding, if there is a lot to process). Hope it helped. Regards, Jake
  • How to use Qt Gui Script in dialog box (example source calculator)

    2
    0 Votes
    2 Posts
    2k Views
    K
    welcome to devnet Please use "code wrappings":http://qt-project.org/wiki/ForumHelp#e3f82045ad0f480d3fb9e0ac2d58fb01 for your posted code sections. This time I have introduced them for you.
  • 0 Votes
    1 Posts
    1k Views
    No one has replied
  • Need a window manager, understanding Qt hints best

    2
    0 Votes
    2 Posts
    2k Views
    A
    Well, nobody can offer any suitable WM?
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • System Messages & Screen Savers

    1
    0 Votes
    1 Posts
    3k Views
    No one has replied
  • Multiple QTextBlocks on a single line?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Best practice to access gui elements from other classes ?

    6
    0 Votes
    6 Posts
    4k Views
    ?
    At first I was cautious embracing signals and slots, coming from some basic procedural programing skills I assumed the code that executes when a button is pressed must be tightly packed with the button, which is different than the signal and slot paradigm, where the code just sits there and is only connected to the signal of the button, making it easy to use the same code from other places without duplicating it. I also had performance concerns but signals and slots are very fast, hundreds of thousands of calls per second on an average contemporary machine. I still dislike the fact the actual code is written by the MOC, because I like to know what's happening even if it is swiped under the carpet, and after I discovered the messy ways to implement callbacks myself I am glad to leave it all to the MOC and just live with it.
  • Qt Networking - TCP server ip address

    6
    0 Votes
    6 Posts
    5k Views
    Z
    Yes that is correct, you can just use the 192.168.2.x ip addresses to communicate internally on your local network. Good luck with your project!
  • How to detect when icon clicked in item delegate ?

    2
    0 Votes
    2 Posts
    4k Views
    A
    You should reimplement the editorEvent() virtual method from [[doc:QAbstractItemDelegate]]. From the documentation: [quote]Mouse events are sent to editorEvent() even if they don't start editing of the item. This can, for instance, be useful if you wish to open a context menu when the right mouse button is pressed on an item.[/quote] So, you can handle mouse events from this method. It is up to you to determine if a click is on an icon or not. For communication of the event, I would give the delegate one or more signals (that include a QModelIndex as an argument) that communicate the triggering of the event.
  • How to list foreach from array

    11
    0 Votes
    11 Posts
    41k Views
    A
    Sure, it's less lines, but I doubt it is more readable. I find the readability issue important. An interesting read on designing for readable code, and a good summary of why the Qt API looks the way it does, can be found in "The Little Manual of API Design":http://www4.in.tum.de/~blanchet/api-design.pdf . I think it's a good read.
  • Using Qt c++ function in qml

    2
    0 Votes
    2 Posts
    2k Views
    ?
    You have to subclass QDeclarativeItem, or at least QObject, add use the Q_PROPERTY macro for all properties you need to access from QML and so on, read in detail here: http://doc.qt.nokia.com/4.7-snapshot/qtbinding.html
  • 0 Votes
    6 Posts
    11k Views
    M
    The application developer states that my library needs to have been build with the msvc compiler, not the mingw compiler. That is what is meant by the need to generate a .lib static library. I guess I need to somehow add the msvc compler to the tool chain or rebuild qt with the msvc compiler.
  • Qt.conf

    11
    0 Votes
    11 Posts
    7k Views
    G
    Ok thanks Things are a little clearer now Thank-you for your patience!
  • Swf loaded into WebKit

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Remove "Quit" from Mac OS X app's dock-menu

    11
    0 Votes
    11 Posts
    5k Views
    G
    You don't need to copy the data from the temp folder to the final destination if both are on the same disk, a move/rename is sufficient in this case.
  • Problem resizeing Qtablerow row hight

    5
    0 Votes
    5 Posts
    4k Views
    U
    Thanks for the fast reply but .. when i set simple test just to see if the role == Qt::SizeHintRole ever getting there (using break point ) it never gets there . never entring to the if (role == Qt::SizeHintRole) this is how it looks only for testing .... @QVariant ListMiniSqlModel::data(const QModelIndex &index, int role) const { QVariant value; value = QSqlQueryModel::data(index, role); if (role == Qt::SizeHintRole) { return QSize (100,100); // never gets here .... } return value; }@ by the way the data is presented great so its working
  • Subclassing QGraphicsScene

    7
    0 Votes
    7 Posts
    6k Views
    A
    The Q_OBJECT macro does more than I wrote. Basically, it sets everything up so Qt's meta object system can be used.
  • Incorrect QtProperty Order on QtTreePropertyBrowser

    2
    0 Votes
    2 Posts
    2k Views
    Y
    Is there any examples related to QtTreePropertyBrowser? I have find a documentation at link http://www.wiki.crossplatform.ru/index.php/The_Property_Browser_Framework . Is there other links you know? Can we say that Qt recommends using other classes instead of QtTreePropertyBrowser because of not having documentation?
  • How can we get back a window with frame in a framelesswindow?

    3
    0 Votes
    3 Posts
    2k Views
    P
    [quote author="Lukas Geyer" date="1332229127"]Just clear the flag. Be aware that altering window flags automatically hides the window. setWindowFlags(windowFlags() & ~Qt::FramelessWindowHint); show(); [/quote] thanks. I have tried when i was resetting the window flag my window was disappearing because i was not using the show() function. I have got another way of showing the frame of window by using @setWindowFlags(Qt::WindowTitleHint)@