Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 457.9k Posts
  • Qt equivalent to MS UserControls

    2
    0 Votes
    2 Posts
    4k Views
    G
    Widget/Caption A widget only has a caption bar when it is displayed as toplevel widget. As soon as you put it into some other widget, it is frameless. Overlays Seems like "QStackedWidget":http://doc.qt.nokia.com/4.7/qstackedwidget.html could do what you want. As you are completely new to Qt, I'd propose to go through some tutorials: "How to learn Qt":http://doc.qt.nokia.com/4.7/how-to-learn-qt.html "Getting Started Programming with Qt":http://doc.qt.nokia.com/4.7/gettingstartedqt.html (translations in the "wiki":http://developer.qt.nokia.com/wiki/Category:Learning::GettingStarted) "Tutorials overview":http://doc.qt.nokia.com/4.7/tutorials.html
  • QTableView: updating the model and visible area

    24
    0 Votes
    24 Posts
    33k Views
    D
    [quote author="Volker" date="1295218048"] I am angry and condescending. I can't contribute anything useful to the conversation because I am too busy telling other people that they don't know what they are talking about [/quote] Volker, thank you for adding some comic relief to my thread. Gerolf and Andre, thank you for your help and input. I have successfully implemented a solution for my model/view infrastructure. I finished the primary development of my solution today. It comprises a data model bundled with 3 views in single widget that inherits from QFrame. Two of the views provides frozen headers for the columns and rows of arbitrary size. The frozen headers can be toggled on and off. The solution provides an API for easily wrapping a client's custom data structure in a table view format. The client only has to implement a few API functions for data access and view organization. The client doesn't have to know much about Qt's model/view framework to use this solution. I realized that the cost of calculating locations for row insertions and deletions is not significant as such calculations have to be done repeatedly in the data(), setData(), and flags() functions anyway. Using the beginXXX() and endXXX() paradigm still seems unsatisfactory to me, but I have figured out a solution that works well. If it is wanted, I may post my solution with a working example in a few days
  • [Moved] QtMobility on Windows

    2
    0 Votes
    2 Posts
    2k Views
    J
    OK, I found out that I have to remove the debug libraries. But the error defaultServiceProvider::requestService(): no service found for - "com.nokia.qt.mediaplayer" remains. I believe this is caused by a missing DirectShow plugin. I noticed during cofigure that it didn't detect DirectShow correctly. Is my assumption regarding missing DirectShow plugin correct? If yes, why the configure command didn't recognize it? I have Windows XP and DirectShow is working fine on my computer. It isn't broken by any codecpacks or other crap.
  • 0 Votes
    4 Posts
    8k Views
    G
    Sorry, still not a short, complete, compilable example. short: Leave out anything that is not necessary to reproduce the problem (eg. writing stuff, when the problem is in the reading part) complete + compilable: all files needed to produce an executable that demonstrates the error. This does include the necessary header files and - in Qt world - a project file, and - if used - the data files. Nothing less. Nothing more. No platform dependend paths. Use paths relative to your executable. Please understand, that we do not have time nor find it funny to create header files for some random class we are supposed to analyze. Regarding your code, after a short look: If you call readNextStartElement() you need not check the token type. It is always of type QXmlStreamReader::StartElement. Also, stick to one type of read: Either readNextStartElement() + readElementText() (and attributes() of course) or do readNext() and peek the contents manually. You did not have a look at the mentioned streambookmarks example, did you? You can apply the techniques demonstrated there almost one-to-one to your project. You must be brave enough to wipe out your old code and start from scratch, though.
  • QMainWindow Context Menu

    5
    0 Votes
    5 Posts
    5k Views
    J
    [quote author="Volker" date="1295301672"]Is "QMainWindow::createPopupMenu() ":http://doc.qt.nokia.com/stable/qmainwindow.html#createPopupMenu what you need?[/quote] Yep... Thanks Volker.... I didn't see it.
  • Handling Qt initialization status

    6
    0 Votes
    6 Posts
    5k Views
    J
    Right, that's what I thought in first place. But that means I have to filter out any "-display" switch myself. Ok, I can live with that, but I thought there was a better way to do this. :) Thanks to all of you for your time and your answers. ;) bye :) P.S.: I know QApplication recognizes "-display". The thing I didn't know is if there was some way of letting Qt handle the arguments, and then react according to the initialization status.
  • Right click with mouse

    5
    0 Votes
    5 Posts
    6k Views
    M
    Many thanks :-)
  • Internationalization for two Applications

    9
    0 Votes
    9 Posts
    4k Views
    G
    [quote author="messi" date="1295349182"]Ah okay, I had something similar in mind. E.g creating a translation.h file which contains const qstring which are used in both applications. The big disadvantage here is that we do not have an order by classes. All string are mixed up. So the conclusion here is that there is no easy way that two apps use one resource file. Thanks. Cheers J[/quote] Hi you can have a file, but noit with static strings. What I already saw (and what does not work) is having global variables (or local ones with static) that are initialized like this: @ static const QString szText = QObject::tr("Bla"); @ In this case it was a module local constant. But the tr Marco is executed, before your translation file is loaded, as global variables are initialized, before executing code for main().
  • Still working with tutorials...

    22
    0 Votes
    22 Posts
    9k Views
    T
    You want to generate XCode projects when you want to work with the XCode IDE.
  • QFileDialog used as widget

    2
    0 Votes
    2 Posts
    2k Views
    G
    I would use QTreeView and QFileSystemModel. [quote author="luka.v.pikor" date="1295310782"]Hi! My goal is: user can choose file (only *mp3) and after clicking twice on it it should play (so the QString to file should be send to play() funtion) Firstly I started to work with QTreeView, but it has signal when the file is selected. ... [/quote] Did you try the signal "doubleClicked":http://doc.qt.nokia.com/4.7/qabstractitemview.html#doubleClicked
  • Changing bpm of audio file with phonon.

    3
    0 Votes
    3 Posts
    2k Views
    K
    Thats what I thought also, but wasn't sure. thanks...
  • How to convert QImage to SDL_Surface

    5
    0 Votes
    5 Posts
    4k Views
    R
    I have look at this project and found this project only use SDL to decode audio. Anyway, thank you.
  • Server not reading all data

    7
    0 Votes
    7 Posts
    4k Views
    W
    Thanks for the help
  • [solved]QDialog interacts on QMainWindow

    5
    0 Votes
    5 Posts
    5k Views
    B
    oh, I am so stupid, I lost my last 4 hours and this was that simple :/ so I am much grateful for yours anwsers :) Thank you very much :)
  • Getting syntax error in tutorial

    25
    0 Votes
    25 Posts
    14k Views
    G
    The macros are defined in qobjectdefs.h of QtCore module. They must be defined in a .h file otherwise the compiler would bail out.
  • QWebView with static compiled Qt

    6
    0 Votes
    6 Posts
    6k Views
    G
    Ahh, thanx. I thought it might be something like that
  • Connecting a children widget with main widget

    14
    0 Votes
    14 Posts
    8k Views
    G
    You should at least call qmake after you add the first signal or slot to your class to catch up the changes.
  • Widget for using with following purposes? (text editor, links)

    4
    0 Votes
    4 Posts
    3k Views
    A
    Thanks a lot Volker that helped me too.
  • Is that possbile to change the border color & style of frame box

    7
    0 Votes
    7 Posts
    6k Views
    F
    Actually I'm on using Qt to implement a rendering engine of a lightweight browser. It's unlikely to mix up these 2 style sheets.
  • Cmd-H shortcut on Mac OS

    3
    0 Votes
    3 Posts
    4k Views
    E
    Amazing ! Thank you very much, it worked ! I already had a menu entry to open my window and I simply added a raise() and an activateWindow() and my window appears ! Regards