Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 458.0k Posts
  • Customize QAction

    4
    0 Votes
    4 Posts
    3k Views
    F
    Have a look a the "Main window example":http://doc.qt.nokia.com/latest/demos-mainwindow.html, in particular "toolbar.cpp":http://doc.qt.nokia.com/latest/demos-mainwindow-toolbar-cpp.html.
  • Font widget in Qt

    6
    0 Votes
    6 Posts
    4k Views
    S
    thanks for your suggestions, I'm going to implement it from scratch :)
  • [Solved]Problem compiling with Q_PROPERTY

    4
    0 Votes
    4 Posts
    5k Views
    D
    O man I'm embarrassed, I accidentally deleted those functions, please disregard this.
  • QTextEdit and custom paint event

    4
    0 Votes
    4 Posts
    7k Views
    S
    Yes this is a subclass of QTextEdit. I do see that I have to do all the blinky cursor stuff myself. QPlainTextEdit has a really nice convenience function called getPaintContext that handles the state of the cursor for you, wish they had the same call in QTextEdit. oh well.
  • QSettings working on a QByteArray

    4
    0 Votes
    4 Posts
    5k Views
    A
    try this: @ bool readXmlFile(QIODevice &device, QSettings::SettingsMap &map); bool writeXmlFile(QIODevice &device, const QSettings::SettingsMap &map); int main(int argc, char *argv[]) { const QSettings::Format XmlFormat = QSettings::registerFormat("xml", readXmlFile, writeXmlFile); QSettings settings(XmlFormat, QSettings::UserScope, "MySoft", "Star Runner"); ... }@
  • Text selections is causing custom formatting to be overwritten

    5
    0 Votes
    5 Posts
    3k Views
    ?
    how about using these style attributes in a stylesheet? selection-color and selection-background-color would that solve your problem. I'm able to set my choice of colors here ...
  • How to set moc on VS addin 1.1.6 and Qt 4.7.0

    4
    0 Votes
    4 Posts
    3k Views
    S
    Wierd, works for me. All I do is add the Q_OBJECT macro and save the file and it generates everything needed to compile, both on 2010 and 2008....
  • QToolButton stylesheet

    2
    0 Votes
    2 Posts
    5k Views
    ?
    I think you know that the setToolButtonStyle() can only set the icon position wrt the text. e.g. the "folder" icon for the File->Open ... not to be confused with menu arrow position. From what I've seen, I don't think by default you can set the menu arrow position to a different location using stylesheet. Check this "faq":http://developer.qt.nokia.com/faq/answer/how_can_i_draw_custom_subcontrols_for_a_complex_control on a similar example on how to draw custom sub controls for a complex control
  • Extending SWT with Qt widgets

    3
    0 Votes
    3 Posts
    4k Views
    Z
    I have read this documentation - but experimenting with static linking takes a lot of time (i.e. you need to completely rebuild Qt) - and it does not build WebKit when you do configure -static. As I am not sure if it is really doable, I wonder if somebody could try to build it if he already have the configured information.
  • Error getting current time

    16
    0 Votes
    16 Posts
    8k Views
    F
    well i didnt post a complete code solution, i only mentioned a thread that sleeps a bit in every loop
  • Embedding Qt in SWT (win32)

    6
    0 Votes
    6 Posts
    7k Views
    Z
    I created a new "forum topic":http://developer.qt.nokia.com/forums/viewthread/1105/ that has link to published sources.
  • Automagically resize window

    6
    0 Votes
    6 Posts
    9k Views
    ?
    so would the solution be ... if the pixmap size is smaller than the current label size, then call setGeometry on the dialog based on the pixmap size? also if not programatically, then one can use the setSizeGripEnabled on the dialog I think.
  • Db application c++

    2
    0 Votes
    2 Posts
    2k Views
    S
    No, 'just' canghe the connection string, or maybe you can use ODBC for connection.
  • A bug in Qt's flash rendering using the flash plugin

    11
    0 Votes
    11 Posts
    6k Views
    1
    Note to all who had this problem, update Qt via the ubuntu repository, and you may or may not need to restart for it to take effect, but this bug is fixed.
  • Non-Ascii characters in Windows console

    4
    0 Votes
    4 Posts
    4k Views
    S
    Yes, the cmd shell does obviously not support Latin1. I can change the font using the chcp command, but no avaiable font matches Latin1. But QT supports encoding to the console encoding, which is "IBM 850" in my case. What I need is a method that tells me the current encoding of the console font, so I can set the correct encofing in my program.
  • Render directly to screen

    3
    0 Votes
    3 Posts
    3k Views
    Y
    It could be possible by either accessing your display driver/framebuffer directly or you can have your customized paint engine. bq. To render outside of Qt's paint system, e.g., if you require native painting primitives, you need to reimplement QWidget::paintEngine().
  • Using QThread

    10
    0 Votes
    10 Posts
    7k Views
    J
    Excellent discussion! Thanks for all the options. There's a few other conditions I have on this problem, but looks solvable at a much higher level than I'm using.
  • How can I add a label to a QWidget's title bar?

    2
    0 Votes
    2 Posts
    4k Views
    T
    Unless you mean a tool bar or the status bar, this is in general not possible since the title bar is outside of Qt's control (it is provided by the window manager). There may be platform-specific solutions for adding things to the title bar though. At least I've seen applications that appear to do that on Windows and Mac. But you would have to use the platform API for that.
  • Rendering Japanese text on PC / Mac / Linux

    2
    0 Votes
    2 Posts
    3k Views
    T
    You will need a font for the languages you want to use. If such a font is provided then Qt can render "most of the world's writing systems". This refers to being able to do all the complex arranging of the individual bits and pieces found in the font file correctly.
  • Incorrect CSS handling in Qt Svg module?

    3
    0 Votes
    3 Posts
    4k Views
    ?
    QtSvgRenderer also fails to load the CSS if the SVG uses relative path to the CSS. Have logged a bug "here":http://bugreports.qt.nokia.com/browse/QTBUG-14043