Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.2k Posts
  • Creating wait screen

    8
    0 Votes
    8 Posts
    5k Views
    M
    Unfortunately, a QProgressBar would suffer from the same shortcomings as a QProgressDialog if the main event loop is blocked by the work in progress. DurgeshK mentioned that his processing is running 3rd-party code, so there's no way to process events during the work being done.
  • [SOLVED]convert const QImage & to QImage *

    10
    0 Votes
    10 Posts
    10k Views
    M
    Be sure and change the title of the thread to add [Solved]. Thanks!
  • QSqlTableModel don't set Dirty Flag..

    4
    0 Votes
    4 Posts
    3k Views
    L
    Not that way [quote] If index is invalid or points to a non-existing row, false is returned. [/quote] You could listen to the dataChanged() signal however.
  • [Solved]Wrong QRegExp

    7
    0 Votes
    7 Posts
    2k Views
    R
    Ok, thank you for help!
  • Some issues in plugin design...

    21
    0 Votes
    21 Posts
    8k Views
    M
    [quote author="Gourmand" date="1313185840"]I did not get qualified answer yet. No regarding to Qt-inside engineers. This all was a "speech about nothing". No one of you all answered to my question. Is this site moderated? Can anybody turn discuss to proper line? [/quote] Hi Gourmand, please check your attitude on these forums. Folks are trying to help you and your replies can be interpreted as rude and ungrateful. This forum has people of many cultures and backgrounds so please be extra thorough when expressing yourself. Yes, this forum is moderated. Read up on what Lukas Geyer and loladiro writes about this forum above, it's good advice. Thanks, -MariusG (admin)
  • [Solved]Context menu

    7
    0 Votes
    7 Posts
    2k Views
    R
    I fogot to call function setContextMenuTabWidget(); and create menu
  • Problems with QstandardItem and setFlags

    3
    0 Votes
    3 Posts
    5k Views
    K
    Is your problem solved now? If so, please mark it with [Solved] in the subject line.
  • Save / load the state of lineEdit widget

    2
    0 Votes
    2 Posts
    2k Views
    G
    In the same way as the "store the state of a variable":http://developer.qt.nokia.com/forums/viewthread/8520/ or "save the result of a check box":http://developer.qt.nokia.com/forums/viewthread/8485/ . Use QSettings and store each property you need to store.
  • Deploying a mac package

    10
    0 Votes
    10 Posts
    6k Views
    AlicemirrorA
    elyness, I think that that the consideration should be out of the Qt packaging question. If the previously installed stuff is a set of components i.e. libraries or commands etc that - to be clear - will be managed / called by the application the problem is how these packages should be installed. To give and example the Inkscape porting on Mac will work as do Gimp and other programs with the "X" component for Mac. This means that you before install the "X" component that is packaged in a way so that the application can start from the aplication menu but also called automatically like any other Mac OS-X command. After installing and running Inkscape or Gimp you see that if it is not running yet "X" component will start before. The legacy stuff that you should have external to your package need to be installed somewhere in the Mac OS so that it can be managed / launched by other applications (i.e. the programs under /bin, or /usr/bin or /usr/sbin and this means as I understand, that: Your application package should be app as you have already done The legacy stuff should be packaged for install separately (i.e. deployed only in the first installation or as a "needed package" Your users should install / update their application in the conditions that the legacy stuff is already present in the computer. What the application should do is to check the presence of these files or libraries when start and - if not - notify it to the user. Can be a method ?
  • Qt::SizeHintRole isn't adjusting the height of a QTableView Row?

    2
    0 Votes
    2 Posts
    12k Views
    S
    There where a number of steps, most of them I got from here: http://developer.qt.nokia.com/faq/answer/how_can_i_change_the_row_height_of_a_qtreeview I had to set QTableView::resizeRowsToContents to true and implement the QItemDelegate::sizeHint. In implementing the sizeHint, I had to get into the model, get the image, and return the size of the image. Once I did that, it sized correctly for me.
  • [Solved] QRubberBand and QGLWidget

    5
    0 Votes
    5 Posts
    5k Views
    R
    Sorry, just test count of points I've get when reply on post. I think I've got 5 points against 2. [Update]: indeed 5 points. Oh here is new Points&Ranks rules.
  • Automated Tools to Convert Visual Studio Project to Qt???

    3
    0 Votes
    3 Posts
    4k Views
    G
    AFAIK yes, I know no conversion tools from C# forms to Qt ui files. Even, porting the pur UI definition is the smallest part, isn't it?
  • Resizing the widget containing a QGraphicsScene and QGraphicsView

    4
    0 Votes
    4 Posts
    8k Views
    S
    Thanks for the replies, so here is my dilemma and the reason I am using widget1 and widget2 inside the splitter: In fact my mainWindow layout is a splitter with a nested splitter, so First I have a Horizontal splitter that splits the screen in 2, so in the right "slot" I put another splitter which is a vertical splitter called "nestedsplitter". Nested splitter also splits the window in two(vertically) and I will display a QImage inside the top slot of the nested splitter and another image inside the bottom slot of nestedSplitter. I use splitter because I need to resize these images vertically whenever I want. So in my code I use a function called createWidgets() that creates all my widgets along with the splitters, and a QGraphicsView Widget that has my scene and Graphics Item. After everything is created I layout all the widgets inside the splitters. So when I make my QGraphicsView and scene I set the sceneRect to be the size of my QGView Widget and inside my GraphicsItem class, I pass the scene which the item will be added to, this to get the boundingRect() to return the sceneRect size which was set to be the size of the QGraphicsView widget and in the paint method I do @ painter->drawImage(sceneRect, myImage); @ With this I get the image painted inside the splitter slot that I want, but only a portion of it and not the entire top or bottom slot of my nestedSplitter mentioned above. For this is that I tried putting a widget (widget1) inside the splitter and passing that as parent to the QGraphicsView widget, and with that size I set the setSceneRect to later draw my image in the entire splitter slot. But the problem that its only painting a portion of the image is I think that the size of the parent I pass in this case widget1 in the splitter doesnt have a size until I set @nestedSplitter->addWidget@ and use the setsizes for the nestedsplitter. Also when I move the splitter handler to resize it is very slow and the image doesn't get resized to fit the splitter that is containing it. Instead scrollbars appear. So I would like to know where is it that I have to handle the resizing of the image so that when I change the size of the splitter, the image gets resized appropriately to always occupy the "slot" of the splitter that contains it, and also how can I properly set the scenerect so the whole image gets drawn and not only a portion of it even though when I pass only widget1 into the splitter it occupies the whole splitter slot as the view should. I would really appreciate any guidance, I hope I was clear enough :) Thanks.
  • Tcp threaded vs single thread for server program

    5
    0 Votes
    5 Posts
    6k Views
    L
    The question is whether you want to focus on programming effort, i.e. on a simple program, or on efficiency / heavy load. If you want to do the latter, it's probably worth it to look at this older but still excellent article: http://www.kegel.com/c10k.html Another example on "how to handle multiple network requests" is the reactor pattern: http://en.wikipedia.org/wiki/Reactor_pattern . The Python networking library "Twisted" ( http://twistedmatrix.com/trac/ ) makes heavy use of this pattern. I think a good introduction to the reactor pattern in Twisted is this: http://twistedmatrix.com/documents/current/core/howto/reactor-basics.html So then you can try to estimate your needs, and decide which design / architecture suits your requirements best.
  • Client and server example

    2
    0 Votes
    2 Posts
    3k Views
    L
    All network examples are listed "here":http://doc.qt.nokia.com/4.8-snapshot/examples-network.html . The "network chat" example is p2p though.
  • QAbstractListModel data access

    10
    0 Votes
    10 Posts
    5k Views
    M
    "I've reported a Bug ...":https://bugreports.qt.nokia.com/browse/QTBUG-20898
  • 0 Votes
    5 Posts
    3k Views
    U
    but its is 2 functions , the scope of the QEventloop is local to its function
  • Key Press and Qt::ToolTip Flag

    6
    0 Votes
    6 Posts
    4k Views
    S
    Alternatively, you can use the approach from this "FAQ":http://developer.qt.nokia.com/faq/answer/how_can_i_create_a_window_that_has_no_taskbar_entry where we create a dummy widget that acts as a parent for a second widget and then pass in the Window flag to the second widget.
  • Require administrator privileges

    5
    0 Votes
    5 Posts
    7k Views
    T
    I know this is an old post but did you ever find a fix for this. I am currently in the same situation and need to elevate the priveleges of my application in order for it to work as required. I have managed to find out that I need to include a manifest file within my application in order to achieve this but I cannot find any resources on how to do this on the net. Thanks in advance Scott
  • Where to upload my snippets to make someone to learn how to plan?

    8
    0 Votes
    8 Posts
    2k Views
    S
    thank you for gentleness! :)