Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • 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
    6k 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
    3k Views
    S
    thank you for gentleness! :)
  • New User: Can You Point Me to the Right Place

    7
    0 Votes
    7 Posts
    3k Views
    M
    I would like to read your blogs, but I don't speak or read a lick of Chinese and, Google translate isn't the best. Could you reference some of your sources in the blogs? I really don't mind reading, but sometimes it is good to ask before you start just reading anything. More time efficient. Btw thank you for your time in explaining this stuff to me, greatly appreciated. Do you have a freenode and/or irc channel, or Usenet group available? --Matt
  • Calling the mainwindow methods from the dialog.

    3
    0 Votes
    3 Posts
    2k Views
    M
    If you have a MainWindow and you create another MainWindow inside of Dialog, they do not refer to the same object. If you want to communicate back and forth between your Dialog and MainWindow, perhaps you should use signals and slots.
  • [SOLVED] mainwindow and dialog load up as separate programs

    9
    0 Votes
    9 Posts
    4k Views
    D
    please, remove line 20 in mainwindow.h or change line 9 in mainwindow.cpp to @ tt = new Dialog(this); @
  • Calling the dialog checkbox from mainwindow

    17
    0 Votes
    17 Posts
    7k Views
    K
    yes that's correct
  • How do you bind a QStringList to a QListView?

    3
    0 Votes
    3 Posts
    7k Views
    D
    [quote]I have a collection of records, each containing two fields: a Name and a collection of strings associated with that name. I would like to bind the Name to a Label (no problems doing this) and the string collection to a QListView, such that the collection of strings displayed in the QListView update when a new record becomes active.[/quote] Can you elaborate more on the part "when a new record becomes active"? What do you mean? Do you have a QDWM-like interface, in which you move upon the records? (Btw, Qt provides QStringListModel.)
  • QTreeView Filter

    4
    0 Votes
    4 Posts
    3k Views
    D
    Of course, it's possible to implement a custom proxy model that applies your filter. I just don't think that something like that is already available in Qt.
  • Downloading app

    5
    0 Votes
    5 Posts
    3k Views
    A
    i think youtube provide a function to det the url ...because many app support youtube download like"http://keepvid.com/":http://keepvid.com/..does anyone know how??
  • [SOLVED]Library H-E-Double Hockey Stick: Now Missing Driver

    8
    0 Votes
    8 Posts
    3k Views
    B
    All I know is I want one.
  • Multiple network cards on one PC. Packages sent through the driver.

    9
    0 Votes
    9 Posts
    6k Views
    L
    Like this: @ udpSockect.bind(QHostAddress::LocalHost,12345); @
  • Unreferenced Libraries?

    16
    0 Votes
    16 Posts
    5k Views
    J
    Thanks for the help guys!
  • [problem found]Qt Creator slow on Mac v10.7 (Lion)

    7
    0 Votes
    7 Posts
    4k Views
    M
    Thanks! Always useful to have a reference to the bug on the thread.