Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Context menus: trigger an action on an item that has a sub-menu.

    2
    0 Votes
    2 Posts
    4k Views
    A
    You don't. The action is "show the sub menu". It would be very confusing if the action does more than that.
  • Using TreeWidgets

    10
    0 Votes
    10 Posts
    4k Views
    A
    [quote author="Arukas" date="1328130428"]I just want to get the correct item out of the tree. Is the only way to use a @map<QTreeWidgetItem, int>@ or does the treewidget do something like that already for you? [/quote] I posted a solution for that just above...
  • Question about translating

    14
    0 Votes
    14 Posts
    5k Views
    M
    You could also use "ID-based translations":http://developer.qt.nokia.com/wiki/QtInternationalization#43b304ead4174986c238cb4e0c4d5cb0, too. Although they're not as clean of a solution, IMHO, they are an option.
  • SIGSEGV produced when using QNetworkManager after/during post

    4
    0 Votes
    4 Posts
    4k Views
    G
    Thanks for reporting back. We all know that nasty little erros too good. It so often that it's these tiny typos that make you scratch your head for hours :-) Good luck with your further progress and of course you're very welcome to ask again if needed.
  • QLabel::setText() from a secondary thread

    4
    0 Votes
    4 Posts
    4k Views
    M
    While it would be possible to check for which thread is calling a function in debug builds, it would be too much overhead for release builds IMO. The ground rule is that if a method is not marked as being thread safe, it is not. For setting text, it will work unless the main thread is accessing the text at the same time. It will definitely crash once you ship the program to the client, says Murphy's law :-)
  • Using QDialog with the Button Box

    2
    0 Votes
    2 Posts
    2k Views
    A
    Never mind I figured it out. Took several more tries and reading. My problem is I don't know what I'm even looking for. I had to set modal to tree. Is QDialog::setModal how would say that? Also, its the exec method i over looked. I was under the impression that's not what you want to do. I thought the Qapplication exec was the only one i needed. -Thanks
  • QProcess freezen

    2
    0 Votes
    2 Posts
    2k Views
    B
    The problem is the pipe! Instead, you have to run tasklist as one process and pass the resulting data to another process running the find stunnel.exe.
  • Changing the size of the QComboBox's List

    3
    0 Votes
    3 Posts
    3k Views
    A
    I use the function call, and it worked like a charm.
  • [SOLVED] Save a QTableView as an image

    3
    0 Votes
    3 Posts
    2k Views
    A
    Works perfect....thanks a lot.
  • QTcpSocket problem

    4
    0 Votes
    4 Posts
    2k Views
    A
    This is for login dialog, but for connecting the socket, to the other dialog? I mean, yea, this looks similar to what I have in the login dialog, but how to connect, the resulting socket, from this, to the second dialog? Thanks alot.
  • How to define structure inside hash?

    5
    0 Votes
    5 Posts
    3k Views
    A
    Thank u all... I did it.... Thank u so much....
  • Embed a QWidget inside a non-Qt window

    3
    0 Votes
    3 Posts
    3k Views
    P
    Thank you, unfortunately this will not work, if I find a solution it must work on Mac OS too. In fact Mac OS is my primary development platform. Thanks anyway.
  • [Solved]Q_OBJECT and vtable

    5
    0 Votes
    5 Posts
    4k Views
    T
    It helped when I took the .o file away. The comment was as I mentioned before just a lucky hit when I tried to get what went wrong when I builded my class.
  • How to deal with comma and apostrophe chars when inserting into SQLight

    6
    0 Votes
    6 Posts
    8k Views
    U
    i just looked the :formatValue source code , its using simple replace (: and this is what i did. Thanks for helping guys
  • CheckBox doesn't toggle if placed in a specific place in QGridLayout

    4
    0 Votes
    4 Posts
    2k Views
    T
    :'( Apparently I have to go to report this as a bug. But I can't understand the full dimensions of the problem...!
  • Question about January 2012 release for QTSDK 1.2 with Qt 4.8

    4
    0 Votes
    4 Posts
    2k Views
    Q
    Thanks for the wonderful news! On a side note the ftp directory is still broken though.
  • 0 Votes
    3 Posts
    5k Views
    I
    Thank you miroslav. Now It works. This is the final working code: @void MainWindow::on_MainWindow_customContextMenuRequested(const QPoint &pos) { QMenu *menu = new QMenu(); QAction *setupAction = new QAction("Setup", this); QAction *monitorAction = new QAction("Monitor", this); menu->addAction(setupAction); menu->addAction(monitorAction); menu->addAction(ui->actionConnection); menu->exec&#40;QCursor::pos(&#41;&#41;; }@
  • Static singleton and Q_GLOBAL_STATIC

    8
    1 Votes
    8 Posts
    10k Views
    J
    Yes it does.
  • Pixmap to be added to icon

    2
    0 Votes
    2 Posts
    2k Views
    A
    You can do the composition in code using QPainters composition methods, but you will need to generate the images for each of the modes this way and set them on QIcon manually from code. QIcon itself cannot automatically create composites like this.
  • QObject factory in Qt Plugin(non-creator)

    7
    0 Votes
    7 Posts
    5k Views
    A
    So adding Interface header into plugins project file as HEADER += solved the problem :)