Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.6k Posts
  • How do I get a variable t display in a text edit window?

    17
    0 Votes
    17 Posts
    20k Views
    I
    Code is working well now ... I am branching out to put in a menu bar and make a combo box for my program that can pick which *.csv file to read! So far so good! I could not have done this effort with out you guys! Thanks! ironmantis7x
  • QKinecticScroller

    2
    0 Votes
    2 Posts
    1k Views
    A
    Please see "this":/forums/viewthread/18122/ post.
  • Crash on button press

    2
    0 Votes
    2 Posts
    1k Views
    A
    We can't do anything with that. We have no idea what happens in your application, and the crash you post does not contain any useful details. Sorry, no way to help you. Debug your application.
  • Why has javascriptcore not been updated

    8
    0 Votes
    8 Posts
    4k Views
    C
    Hello All, I was recently asked if I have found a resolution to this issue. The answer is kind of. When I was having the problems discussed I was using the compiler that came with openSUSE 11.4. I tried downloading the most recent g++ version and experience the same problems of random crashes. I then demoed the latest intel compiler. Interestingly I have not experience any problems like the one discussed in this ticket. Not sure if this has simply moved the problem somewhere else and I am not encountering it. I tried debugging QT several times to try and isolate what section of code where there might be a problem but every time it crashed it would point to the section of code previously mentioned or worse did not give me any back trace. Hope this helps. jeff
  • [SOLVED] Qt 4.8: Step into Qt's source code on Windows using MSVC

    8
    0 Votes
    8 Posts
    5k Views
    A
    Solved, see http://bit.ly/Opco9O
  • Set a width to a layout

    6
    0 Votes
    6 Posts
    12k Views
    R
    We're all here to learn from(and help) each other... :) Happy Coding..!
  • [SOLVED] Inserting a list of QWidgets into a QScrollArea

    5
    0 Votes
    5 Posts
    7k Views
    N
    Thanks a lot for your advice :)
  • Qt 4.8: Restoring from an initial Maximized state doesn't work (anymore?)

    3
    0 Votes
    3 Posts
    2k Views
    A
    Thanks Swatwork, it's 'nice' to see that I am not the only one experiencing this problem. FWIW, I have just created a bug report for it: https://bugreports.qt-project.org/browse/QTBUG-26322
  • 0 Votes
    4 Posts
    2k Views
    A
    Without a better idea of what you want, me neither, but this really isn't Qt related. That you make your GUI in Qt, does not make questions on what other libs to use on-topic here.
  • How to add Combobox at the top of treeview

    2
    0 Votes
    2 Posts
    2k Views
    A
    One way is to use a [[doc:QStackedWidget]], and create a page with a QTreeView for each of the items in your combobox. Then, let the selectedIndex of the combobox determine the currentIndex() of the widget stack. Or, if it really is the model in the view you'd like to change, do exactly that: use a single QTreeView, and simply add a bit of code to change the model you're using for the view based on the selected item in the combo box.
  • Couple of queries re QtScript

    4
    0 Votes
    4 Posts
    2k Views
    T
    [quote author="TimS" date="1340692510"]Well I'm an idiot anyway because I just figured out javascript doesn't support native enum yet. Boy that is embarrassing. QtScript is great, just a steep learning curve as I'm looking to do complex stuff for my first project. Doesn't matter to me if it is just in maintenance mode. [/quote] There are no enums in js, because we don't need it there).
  • Dont see new signal on outside class

    3
    0 Votes
    3 Posts
    1k Views
    L
    Signals are always protected from a technical point of view (only the class itself and its subclasses can emit them), and always public from a logical point of view (everyone can connect to a signal). The code you've posted works correctly. Make sure that you've included the header file mytextedit.h (no forward declaration) and that you've re-run qmake after adding the signal. In addition, you are missing a call to the base class constructor. @ MyTextEdit::MyTextEdit(QWidget *parent = 0) : QTextEdit(parent) { isEdited = false; } @
  • QTextDocument, print image to fit page width

    2
    0 Votes
    2 Posts
    3k Views
    L
    EDIT (the code I pasted before was wrong. In the post I can't write the code I used with escape character) . To let you see the code I write it with some space characters: html_document_str = " < img src= " :/images/intestazionegw.jpg " width="100%" > " ; The proble in my application is that if I put " width =100% " in my html code I don't see the image in the pdf while if I remove the "width" : html_document_str = " < img src= " :/images/intestazionegw.jpg " > " ; I can see the image printed in the pdf but its dimension is too big and go uotside the page.
  • QTcpSocket Reading issue on slow network

    3
    0 Votes
    3 Posts
    2k Views
    L
    I thought of this solution but did not feel as a clean solution. The problem is, the streamed XML data could be very large. So I have read all this into a large temp buffer and process. I wonder, Qt seems to provide a solution but it is not working as expected. Is there any technical difficulty implementing it? Thanks, Lloyd
  • Problem using the if...else structure in main.cpp

    3
    0 Votes
    3 Posts
    1k Views
    M
    I would rewrite it as something like: @ //a continuation of the main.cpp MainWindow *z = 0; window2 *y = 0; if (0 == access ("C:/Microsoft/add.txt",0)) z = new MainWindow(); z->show(); } else { y = new window2(); y->show(); } return a.exec(); } @ Brain to terminal; ymmv
  • Qobject::connect without QApplication

    2
    0 Votes
    2 Posts
    6k Views
    R
    i think this may be because of the QObject relies on QApplication's initialisation of various elements used by various features(such as signals and slots) although i can't say for sure
  • [solved]QSqlTableModel converting time to unixtime and QDateTime

    2
    0 Votes
    2 Posts
    2k Views
    M
    After you've got a new QDateTime, then you can use toTime_t() to get it back to unix time.
  • [SOLVED] QAction: get way of activation from code

    16
    0 Votes
    16 Posts
    6k Views
    T
    Thanks! Here it is!
  • [solved]Tutorial about new form display

    4
    0 Votes
    4 Posts
    2k Views
    A
    There are also examples on the wiki. Some are quite basic, like "this":/wiki/Basic_Qt_Programming_Tutorial one.
  • QFile design

    5
    0 Votes
    5 Posts
    2k Views
    A
    Actually, it provides very strong encapsulation. You cannot access the d pointer as a user of the API, which is the whole point of encapsulation.